From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C5256C4332F for ; Fri, 23 Dec 2022 16:08:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=xattnCrsEfaHpyum/XIIsnZiHifs/6oguDA+DaiK5sU=; b=W68nGT0WNJ2aqo LrRYQSdcqe7v3bzS7i2ieeRUNbjUyNLD9LUfrvPtojjwkW5apuhJcHqxQdMSxhaEY7lBrdxnnSWJU X0W4AW9btGwQifuDADDh1JE5X8ULgv7lAngWxxVR4CPFBGdWPLzn2EcNbD/7Q8Qh0UTTnIdL0ikV5 U/4qDMqDbmQkKd873bfdr/FOnaPwjQLwqU7EvVJYruyhWCEu8k4YiYKNYHj8lqRA73jMjfkxCUaAh bZk+jSSUntlPv/x4z8sD00QXIGgj2MzFLUEtj7T78BQw9RGhrL2Od4fUAsOq6+U7MI0xB61J6pBkP ZZNn+Cf04wMkOG142Czw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p8ka5-009niP-LB; Fri, 23 Dec 2022 16:07:33 +0000 Received: from ams.source.kernel.org ([2604:1380:4601:e00::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p8kZq-009ncg-T8 for linux-arm-kernel@lists.infradead.org; Fri, 23 Dec 2022 16:07:22 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 5B92EB820E4; Fri, 23 Dec 2022 16:07:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 37274C433D2; Fri, 23 Dec 2022 16:07:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1671811636; bh=Q8ELXJCh1YDyuxTg7vg3kz6RhNqF1hvv6kbMTZMHhko=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=liwW+MtIuhO6vuS9IFRHsu6SCHHpRBU6ZMTew6hDmglCIgsL4WfJljVnmj4alS+43 qmhBnmKFtlYC59uJ8N+45PbZFFUTYhLzQCbQ5ec5eA7P9mNowddJEfPVxzHlEIplGI dCv3j4m5TFlMEeg84aYLAJHyPdqwkqw49FHQ2TeGk4/MeyShsuBAANGwyumiSgnkex aplAmI6Q0nwg6YiV3v1oVUxYTXoeXpkyELUz03ItfElOs+0lIUeVbFhuHdT1c5crOi DODzc7+fHwyTcGEqnRQLWOcoXMZJhWifdsQSU5QjodFICOzXcyeh6k8ehwwsRABdnI G14m/w/CgGMuQ== Date: Fri, 23 Dec 2022 16:20:24 +0000 From: Jonathan Cameron To: Alexander Sverdlin Cc: linux-iio@vger.kernel.org, Hartley Sweeten , Lars-Peter Clausen , Rob Herring , Krzysztof Kozlowski , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 2/2] iio: adc: ep93xx: Add OF support Message-ID: <20221223162024.46636cce@jic23-huawei> In-Reply-To: <20221219173618.1030415-2-alexander.sverdlin@gmail.com> References: <20221219173618.1030415-1-alexander.sverdlin@gmail.com> <20221219173618.1030415-2-alexander.sverdlin@gmail.com> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.35; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221223_080721_267211_4657F3A9 X-CRM114-Status: GOOD ( 22.70 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, 19 Dec 2022 18:36:18 +0100 Alexander Sverdlin wrote: > Prepare for EP93xx conversion to DT. > > Signed-off-by: Alexander Sverdlin Hi Alexander, Comments inline, Jonathan > --- > drivers/iio/adc/ep93xx_adc.c | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/drivers/iio/adc/ep93xx_adc.c b/drivers/iio/adc/ep93xx_adc.c > index fd5a9404c8dc..e530a37180e1 100644 > --- a/drivers/iio/adc/ep93xx_adc.c > +++ b/drivers/iio/adc/ep93xx_adc.c > @@ -21,6 +21,7 @@ > #include > #include > #include > +#include > > /* > * This code could benefit from real HR Timers, but jiffy granularity would > @@ -227,9 +228,18 @@ static int ep93xx_adc_remove(struct platform_device *pdev) > return 0; > } > > +#ifdef CONFIG_OF > +static const struct of_device_id ep93xx_adc_of_ids[] = { > + { .compatible = "cirrus,ep9301-adc" }, > + {}, No comma needed for 'NULL' terminator of the array. > +}; > +MODULE_DEVICE_TABLE(of, ep93xx_adc_of_ids); > +#endif > + > static struct platform_driver ep93xx_adc_driver = { > .driver = { > .name = "ep93xx-adc", > + .of_match_table = of_match_ptr(ep93xx_adc_of_ids), drop the of_match_ptr() protection and the ifdefs. They only save a tiny amount of space, and add complexity that outweighs it. The other normal reason we don't like these is that there are ACPI paths that use of_match_table and this breaks them. Not likely to be relevant here though I guess. Jonathan > }, > .probe = ep93xx_adc_probe, > .remove = ep93xx_adc_remove, _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel