Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp582686pxk; Wed, 16 Sep 2020 11:22:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzjClMqPn8bgyW1c+ON432buPREQ4lNHqe+WsAhoOZcOTqWm+/44Vc8fuQj5zT0L7GiD+XU X-Received: by 2002:a05:6402:326:: with SMTP id q6mr29067882edw.216.1600280552083; Wed, 16 Sep 2020 11:22:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600280552; cv=none; d=google.com; s=arc-20160816; b=A0B69Y0ylCfQECYuTs3R1yKJNOAnaIQ8iUTsCPRKRdikJmlR50yWA722h1JQ56LTCM +eOt/zuukuokCnxAAW7v4qbFcrm934vp+Y8TxT5IQD6lzAOn0ISzW+hkPZySXITtcRZI Mcbb2iB2rwy9sTwoEhapbDNYtc+L/hLzzTg8Q6+qbxBF0pwK6HkZCA+ZLpDDtr+KCK5C fqBgkSVir9Ot051O4RnTBkTb23h2gu40dHESsxku0/ddKe2YKEoUTFsmfSqlgLFNEugi S1l6aijkYPoqon0m1QdYgioyL+s2jymJsMMZNbrD4iA04xwX/hg1hATaU4W3jVqqK/H+ AdEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=/dcSevsyJipb6NipOm1HWVUDk9YUl+2ok61C8nlw160=; b=zVKp7gORCAJjCPMsZJTZHLq8F/fBElJDJ0AXlwxQwGarTvAOoiSFfaF3+kmzTA6KWo lHs4oTF4bFD42wlMyCpsOyRDfs4+gFspB6kscvx4owQWLWRsER85+m6irn049jZeI40u Hpe6jlkSaeeLK6IJ+NPTKDcaR2CPO1bQLBnHIwQTLofJKrdLk3UDXtZh77EcJ7YpKZsy kNL/s2EnPE/TQ7+XM6/ZC6evfsqbsGCfjuqOUsPwpSjlWIgOUV5d6IX6BWdttRPsht9I ONr7o45vNGqkBlq0LLeYA5FUnwyGl74PCBF/ZZZiYfCpMaMrDzOsJQGUO9J67y4Ud0Yr S64w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=uigVu9nT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bv14si12575802ejb.249.2020.09.16.11.22.09; Wed, 16 Sep 2020 11:22:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=uigVu9nT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727889AbgIPSVa (ORCPT + 99 others); Wed, 16 Sep 2020 14:21:30 -0400 Received: from mail.kernel.org ([198.145.29.99]:52636 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727816AbgIPSKo (ORCPT ); Wed, 16 Sep 2020 14:10:44 -0400 Received: from archlinux (cpc149474-cmbg20-2-0-cust94.5-4.cable.virginm.net [82.4.196.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D47AB2083B; Wed, 16 Sep 2020 18:10:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600279827; bh=Ju+mDAYgGgYm5szp6plQMoO737lg/ofifEnvRT90SNI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=uigVu9nT/DR8STMbyQA9tMT/XkN6el3Pw15dPTt8xh/BbT/YlbLT2pDFr6UdeUYo0 HbpOF80HJsVzvdniwdV2k9f1EtOg/eNVhYp8gLWbIR5hvLedQgUjzrboKXUgQNs/Is 55NRPAOwYxB4o39VSGRCT1FcBTK+778DMRhEPGqA= Date: Wed, 16 Sep 2020 19:10:26 +0100 From: Jonathan Cameron To: Liu Shixin Cc: Hartmut Knaack , , Subject: Re: [PATCH -next] iio: adc: palmas_gpadc: use module_platform_driver to simplify the code Message-ID: <20200916191026.56932e1c@archlinux> In-Reply-To: <20200914065401.3726354-1-liushixin2@huawei.com> References: <20200914065401.3726354-1-liushixin2@huawei.com> X-Mailer: Claws Mail 3.17.6 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 14 Sep 2020 14:54:01 +0800 Liu Shixin wrote: > module_platform_driver() makes the code simpler by eliminating > boilerplate code. > > Signed-off-by: Liu Shixin Applied to the togreg branch of iio.git and pushed out as testing for the autobuilders to see if we missed anything. Thanks, Jonathan > --- > drivers/iio/adc/palmas_gpadc.c | 13 +------------ > 1 file changed, 1 insertion(+), 12 deletions(-) > > diff --git a/drivers/iio/adc/palmas_gpadc.c b/drivers/iio/adc/palmas_gpadc.c > index 1ca6570be66a..889b88768b63 100644 > --- a/drivers/iio/adc/palmas_gpadc.c > +++ b/drivers/iio/adc/palmas_gpadc.c > @@ -834,18 +834,7 @@ static struct platform_driver palmas_gpadc_driver = { > .of_match_table = of_palmas_gpadc_match_tbl, > }, > }; > - > -static int __init palmas_gpadc_init(void) > -{ > - return platform_driver_register(&palmas_gpadc_driver); > -} > -module_init(palmas_gpadc_init); > - > -static void __exit palmas_gpadc_exit(void) > -{ > - platform_driver_unregister(&palmas_gpadc_driver); > -} > -module_exit(palmas_gpadc_exit); > +module_platform_driver(palmas_gpadc_driver); > > MODULE_DESCRIPTION("palmas GPADC driver"); > MODULE_AUTHOR("Pradeep Goudagunta");