From patchwork Thu Sep 10 17:32:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 11768359 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 07128139F for ; Thu, 10 Sep 2020 17:39:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DAC4E206A1 for ; Thu, 10 Sep 2020 17:39:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599759589; bh=blQOhietSGkdIajSqFJS++7Xp/W+W41PAK7v1JvlG3A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=XVe+uknuzOzKqbCnyfOA1dZOVgbbWN2r4RhgVHM79z9fZzLG2+lfNM2+nYSX5CCFP L1AZrqHBEpiCAnZCdT88mHmJiMZwwxYfI63466kRm/yn7srM3R3mfSrjjqaGlKF/8P x7KuyuTUz2e1WcUy4mpV42mtpxG/QVt5/KRJGxVE= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726384AbgIJRjq (ORCPT ); Thu, 10 Sep 2020 13:39:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:47928 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726675AbgIJRhN (ORCPT ); Thu, 10 Sep 2020 13:37:13 -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 E283822228; Thu, 10 Sep 2020 17:35:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599759358; bh=blQOhietSGkdIajSqFJS++7Xp/W+W41PAK7v1JvlG3A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yy7i8C4iYkSWwEK4wkxnFnRR5CCeof7b0xHNTa1WFD2a2XFcgJpYQmoEitRWs/Yak 1hZ4UbkuqpO2EzMRpadOhB7N1cfRWZnLaPbCu4Ujbv8XEr2fhhm+GRLIig+eJ4riUo bbqOZVdsXeOyRXVtWedUIuoK61mfwSrlV72v3mUY= From: Jonathan Cameron To: linux-iio@vger.kernel.org Cc: Andy Shevchenko , Jonathan Cameron , Jonathan Albrieux Subject: [PATCH 34/38] iio:magn:ak8975: Drop of_match_ptr and ACPI_PTR protections. Date: Thu, 10 Sep 2020 18:32:38 +0100 Message-Id: <20200910173242.621168-35-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200910173242.621168-1-jic23@kernel.org> References: <20200910173242.621168-1-jic23@kernel.org> MIME-Version: 1.0 Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org From: Jonathan Cameron Both would result in only a small size saving. For simplicity it is best to remove them. I also wish to remove both these antipatterns from IIO. Signed-off-by: Jonathan Cameron Cc: Jonathan Albrieux Acked-by: Jonathan Albrieux Tested-by: Jonathan Albrieux --- drivers/iio/magnetometer/ak8975.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/iio/magnetometer/ak8975.c b/drivers/iio/magnetometer/ak8975.c index 03d71f796177..0141ef3b6476 100644 --- a/drivers/iio/magnetometer/ak8975.c +++ b/drivers/iio/magnetometer/ak8975.c @@ -8,6 +8,7 @@ */ #include +#include #include #include #include @@ -17,7 +18,6 @@ #include #include #include -#include #include #include @@ -773,7 +773,6 @@ static const struct iio_info ak8975_info = { .read_raw = &ak8975_read_raw, }; -#ifdef CONFIG_ACPI static const struct acpi_device_id ak_acpi_match[] = { {"AK8975", AK8975}, {"AK8963", AK8963}, @@ -785,7 +784,6 @@ static const struct acpi_device_id ak_acpi_match[] = { { } }; MODULE_DEVICE_TABLE(acpi, ak_acpi_match); -#endif static void ak8975_fill_buffer(struct iio_dev *indio_dev) { @@ -1075,8 +1073,8 @@ static struct i2c_driver ak8975_driver = { .driver = { .name = "ak8975", .pm = &ak8975_dev_pm_ops, - .of_match_table = of_match_ptr(ak8975_of_match), - .acpi_match_table = ACPI_PTR(ak_acpi_match), + .of_match_table = ak8975_of_match, + .acpi_match_table = ak_acpi_match, }, .probe = ak8975_probe, .remove = ak8975_remove,