From patchwork Tue May 31 17:00:12 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Davis X-Patchwork-Id: 9145241 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 403C1607D6 for ; Tue, 31 May 2016 17:01:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2F0C125D97 for ; Tue, 31 May 2016 17:01:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 22A05281D4; Tue, 31 May 2016 17:01:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EC32325D97 for ; Tue, 31 May 2016 17:01:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755450AbcEaRBS (ORCPT ); Tue, 31 May 2016 13:01:18 -0400 Received: from arroyo.ext.ti.com ([198.47.19.12]:41867 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755448AbcEaRAh (ORCPT ); Tue, 31 May 2016 13:00:37 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id u4VH0FTS008326; Tue, 31 May 2016 12:00:15 -0500 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id u4VH0Fl3000717; Tue, 31 May 2016 12:00:15 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.3.294.0; Tue, 31 May 2016 12:00:15 -0500 Received: from legion.dal.design.ti.com (legion.dal.design.ti.com [128.247.22.53]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id u4VH0Fh2029808; Tue, 31 May 2016 12:00:15 -0500 Received: from localhost (uda0226330.am.dhcp.ti.com [128.247.83.127]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id u4VH0E317745; Tue, 31 May 2016 12:00:14 -0500 (CDT) From: "Andrew F. Davis" To: Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Dmitry Torokhov , Lee Jones , Dave Gerlach CC: , , , "Andrew F . Davis" Subject: [PATCH 7/8] iio: adc: ti_am335x_adc: use variable names for sizeof() operator Date: Tue, 31 May 2016 12:00:12 -0500 Message-ID: <20160531170013.2649-8-afd@ti.com> X-Mailer: git-send-email 2.8.3 In-Reply-To: <20160531170013.2649-1-afd@ti.com> References: <20160531170013.2649-1-afd@ti.com> MIME-Version: 1.0 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Fix the code formatting to use the kernel preferred style of using the actual variables to determize the size using the sizeof() operator. Signed-off-by: Andrew F. Davis --- drivers/iio/adc/ti_am335x_adc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/iio/adc/ti_am335x_adc.c b/drivers/iio/adc/ti_am335x_adc.c index 18af71d..8a36875 100644 --- a/drivers/iio/adc/ti_am335x_adc.c +++ b/drivers/iio/adc/ti_am335x_adc.c @@ -326,8 +326,7 @@ static int tiadc_channel_init(struct iio_dev *indio_dev, int channels) int i; indio_dev->num_channels = channels; - chan_array = kcalloc(channels, - sizeof(struct iio_chan_spec), GFP_KERNEL); + chan_array = kcalloc(channels, sizeof(*chan_array), GFP_KERNEL); if (chan_array == NULL) return -ENOMEM; @@ -467,8 +466,7 @@ static int tiadc_probe(struct platform_device *pdev) return -EINVAL; } - indio_dev = devm_iio_device_alloc(&pdev->dev, - sizeof(struct tiadc_device)); + indio_dev = devm_iio_device_alloc(&pdev->dev, sizeof(*indio_dev)); if (indio_dev == NULL) { dev_err(&pdev->dev, "failed to allocate iio device\n"); return -ENOMEM;