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 X-Spam-Level: X-Spam-Status: No, score=-13.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable 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 92513C433EC for ; Tue, 21 Jul 2020 17:16:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 694E920792 for ; Tue, 21 Jul 2020 17:16:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1595351818; bh=9SdG8N05TDSRJzpOZOLSGePEP3PnZIhkj3HHyjHYrx4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=BGy57fuV7EehloxRf9VbYs1sQGy8QT7tRW/ET3MK2bPGT8D4rid20HDMA6zv1J0zR VcCyrIMc/EfjWmD7GnNowHtZ5FdMJEiH13UgEqR9HAgXPf/ygXRgw2np3levqNE4ne MQS2+bQ07c6SNbPsjTbmkcB9y0EHFofYuR3Xw8WE= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728750AbgGURQ5 (ORCPT ); Tue, 21 Jul 2020 13:16:57 -0400 Received: from mail.kernel.org ([198.145.29.99]:55546 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730259AbgGURQz (ORCPT ); Tue, 21 Jul 2020 13:16:55 -0400 Received: from localhost.localdomain (cpc149474-cmbg20-2-0-cust94.5-4.cable.virginm.net [82.4.196.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7E2E822BF5; Tue, 21 Jul 2020 17:16:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1595351815; bh=9SdG8N05TDSRJzpOZOLSGePEP3PnZIhkj3HHyjHYrx4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LAuGpz1gs8Lnof3eIE/SYkeaP6zak3Py1fTVRQQ4WGlPdxst+oHScfEE+aluZbW4S UK5kYpiey04ZhmkOfxojyTv3/y01/EzhUUqXfYpqnR6Uw77ZkdoD6g1Wskj61WlRKA dHmv5ERJllCcnkP0ATZ5qHZ1S8vhd72koWewCATI= From: Jonathan Cameron To: linux-iio@vger.kernel.org Cc: Andy Shevchenko , Jonathan Cameron , Raveendra Padasalagi Subject: [PATCH v2 5/5] iio:adc:bcm_iproc: Drop of_match_ptr protection and switch to mod_devicetable.h Date: Tue, 21 Jul 2020 18:14:44 +0100 Message-Id: <20200721171444.825099-6-jic23@kernel.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200721171444.825099-1-jic23@kernel.org> References: <20200721171444.825099-1-jic23@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org From: Jonathan Cameron This driver cannot be instantiated from ACPI due to it's use of syscon_regmap_lookup_by_phandle() but in the interests of clearing this anti pattern out of IIO, let us switch to an explicit check in kconfig and remove the protections on the of_match_table The switch of header is because we only use of_device_id in here and that is defined in mod_devicetable.h not of.h. Signed-off-by: Jonathan Cameron Cc: Raveendra Padasalagi --- * Use Kconfig change to make it explicit you can build the driver without OF, but it won't do anything terribly useful. drivers/iio/adc/Kconfig | 2 +- drivers/iio/adc/bcm_iproc_adc.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/iio/adc/Kconfig b/drivers/iio/adc/Kconfig index 66d9cc073157..f495d01a79b9 100644 --- a/drivers/iio/adc/Kconfig +++ b/drivers/iio/adc/Kconfig @@ -340,7 +340,7 @@ config AXP288_ADC config BCM_IPROC_ADC tristate "Broadcom IPROC ADC driver" - depends on ARCH_BCM_IPROC || COMPILE_TEST + depends on (ARCH_BCM_IPROC && OF) || COMPILE_TEST depends on MFD_SYSCON default ARCH_BCM_CYGNUS help diff --git a/drivers/iio/adc/bcm_iproc_adc.c b/drivers/iio/adc/bcm_iproc_adc.c index 936da32faa9d..44e1e53ada72 100644 --- a/drivers/iio/adc/bcm_iproc_adc.c +++ b/drivers/iio/adc/bcm_iproc_adc.c @@ -4,7 +4,7 @@ */ #include -#include +#include #include #include #include @@ -617,7 +617,7 @@ static struct platform_driver iproc_adc_driver = { .remove = iproc_adc_remove, .driver = { .name = "iproc-static-adc", - .of_match_table = of_match_ptr(iproc_adc_of_match), + .of_match_table = iproc_adc_of_match, }, }; module_platform_driver(iproc_adc_driver); -- 2.27.0