From patchwork Sun Mar 14 18:14:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 12137859 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E1AB3C4332E for ; Sun, 14 Mar 2021 18:18:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A2C6064EC4 for ; Sun, 14 Mar 2021 18:18:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233560AbhCNSRq (ORCPT ); Sun, 14 Mar 2021 14:17:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:45044 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233570AbhCNSRj (ORCPT ); Sun, 14 Mar 2021 14:17:39 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id CF22064EC3; Sun, 14 Mar 2021 18:17:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1615745859; bh=G/yDof4P/Fe2MUjVSQA6rgTKsHYd9M9l46Jf2hH6wGM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RarVtevaI0nf/HEgste2cAnB5wTWei9yPz9FbYDZqKsWM9xnWBrwyk9TEfqg2X9ow oF0to5fb1TduPTig/UqUoAvigyTpk+h147yN1lDzNSLnfYCe+uHrrDibXOuReteGPW s3KoyQOCdB/tSDzO2uP4tsPEhjRuGJS0qv51fR2b8ZoA1vJJru7rJBXhf2MaVzyE12 TU7PSRGorrDCQCcWj2TS88ybtZRIGZgRBZumUWRcskRcsxkHO+G+4V73ONA7kbqA0c KlHizfzQuK+VG87ETVwLXJRxBdILGN8qqs7BMyu9ccy/LQpAR9kX4Lge8iZs2T8Ahk DTq9WGq3SPS/Q== From: Jonathan Cameron To: linux-iio@vger.kernel.org Cc: Lars-Peter Clausen , Michael Hennerich , Alexandru Ardelean , Robh+dt@kernel.org, Alexandru Ardelean , Jonathan Cameron , Barry Song , Alexandru Ardelean Subject: [PATCH v2 08/24] staging:iio:cdc:ad7150: Drop noisy print in probe Date: Sun, 14 Mar 2021 18:14:55 +0000 Message-Id: <20210314181511.531414-9-jic23@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210314181511.531414-1-jic23@kernel.org> References: <20210314181511.531414-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org From: Jonathan Cameron Also * drop i2c_set_client_data() as now unused. * white space cleanups Signed-off-by: Jonathan Cameron Reviewed-by: Barry Song Reviewed-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210207154623.433442-9-jic23@kernel.org --- drivers/staging/iio/cdc/ad7150.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/drivers/staging/iio/cdc/ad7150.c b/drivers/staging/iio/cdc/ad7150.c index 34e6afe52f0e..8f8e472e3240 100644 --- a/drivers/staging/iio/cdc/ad7150.c +++ b/drivers/staging/iio/cdc/ad7150.c @@ -573,11 +573,9 @@ static int ad7150_probe(struct i2c_client *client, indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*chip)); if (!indio_dev) return -ENOMEM; + chip = iio_priv(indio_dev); mutex_init(&chip->state_lock); - /* this is only used for device removal purposes */ - i2c_set_clientdata(client, indio_dev); - chip->client = client; indio_dev->name = id->name; @@ -624,14 +622,7 @@ static int ad7150_probe(struct i2c_client *client, } } - ret = devm_iio_device_register(indio_dev->dev.parent, indio_dev); - if (ret) - return ret; - - dev_info(&client->dev, "%s capacitive sensor registered,irq: %d\n", - id->name, client->irq); - - return 0; + return devm_iio_device_register(indio_dev->dev.parent, indio_dev); } static const struct i2c_device_id ad7150_id[] = {