From patchwork Wed Jan 15 17:44:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 11335481 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 8220D92A for ; Wed, 15 Jan 2020 17:44:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6973B2077B for ; Wed, 15 Jan 2020 17:44:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728904AbgAORo2 (ORCPT ); Wed, 15 Jan 2020 12:44:28 -0500 Received: from mga04.intel.com ([192.55.52.120]:15614 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726574AbgAORo2 (ORCPT ); Wed, 15 Jan 2020 12:44:28 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Jan 2020 09:44:28 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,323,1574150400"; d="scan'208";a="248485904" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga004.fm.intel.com with ESMTP; 15 Jan 2020 09:44:26 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id D1055BD; Wed, 15 Jan 2020 19:44:25 +0200 (EET) From: Andy Shevchenko To: Jonathan Cameron , linux-iio@vger.kernel.org, Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler Cc: Andy Shevchenko Subject: [PATCH v1 1/2] iio: magnetometer: ak8975: Get rid of platform data Date: Wed, 15 Jan 2020 19:44:24 +0200 Message-Id: <20200115174425.70728-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.24.1 MIME-Version: 1.0 Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org Since IIO framework supports device property API and driver has been moved already to the use of GPIO descriptors the logical continuation is to get rid of platform data completely. We are on the safe side here since there are no users of it in the kernel. Signed-off-by: Andy Shevchenko --- drivers/iio/magnetometer/ak8975.c | 14 +++----------- include/linux/iio/magnetometer/ak8975.h | 15 --------------- 2 files changed, 3 insertions(+), 26 deletions(-) delete mode 100644 include/linux/iio/magnetometer/ak8975.h diff --git a/drivers/iio/magnetometer/ak8975.c b/drivers/iio/magnetometer/ak8975.c index 55cffaa82456..8e50e073bcbf 100644 --- a/drivers/iio/magnetometer/ak8975.c +++ b/drivers/iio/magnetometer/ak8975.c @@ -28,8 +28,6 @@ #include #include -#include - /* * Register definitions, as well as various shifts and masks to get at the * individual fields of the registers. @@ -857,8 +855,6 @@ static int ak8975_probe(struct i2c_client *client, int err; const char *name = NULL; enum asahi_compass_chipset chipset = AK_MAX_TYPE; - const struct ak8975_platform_data *pdata = - dev_get_platdata(&client->dev); /* * Grab and set up the supplied GPIO. @@ -883,13 +879,9 @@ static int ak8975_probe(struct i2c_client *client, data->eoc_gpiod = eoc_gpiod; data->eoc_irq = 0; - if (!pdata) { - err = iio_read_mount_matrix(&client->dev, "mount-matrix", - &data->orientation); - if (err) - return err; - } else - data->orientation = pdata->orientation; + err = iio_read_mount_matrix(&client->dev, "mount-matrix", &data->orientation); + if (err) + return err; /* id will be NULL when enumerated via ACPI */ if (id) { diff --git a/include/linux/iio/magnetometer/ak8975.h b/include/linux/iio/magnetometer/ak8975.h deleted file mode 100644 index df3697183800..000000000000 --- a/include/linux/iio/magnetometer/ak8975.h +++ /dev/null @@ -1,15 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -#ifndef __IIO_MAGNETOMETER_AK8975_H__ -#define __IIO_MAGNETOMETER_AK8975_H__ - -#include - -/** - * struct ak8975_platform_data - AK8975 magnetometer driver platform data - * @orientation: mounting matrix relative to main hardware - */ -struct ak8975_platform_data { - struct iio_mount_matrix orientation; -}; - -#endif