summaryrefslogtreecommitdiff
path: root/drivers/iio/magnetometer/ak8975.c
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2020-01-15 20:44:24 +0300
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2020-01-18 14:43:17 +0300
commit608184788502fd475e7bca4b1692fda5f0fef5b6 (patch)
tree0afa1af2e9d60acc5e7e0ac913723bf1cfdc905a /drivers/iio/magnetometer/ak8975.c
parent79ef91493f5494e9ddbad85bf571ec03940a7f5c (diff)
downloadlinux-608184788502fd475e7bca4b1692fda5f0fef5b6.tar.xz
iio: magnetometer: ak8975: Get rid of platform data
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 <andriy.shevchenko@linux.intel.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/magnetometer/ak8975.c')
-rw-r--r--drivers/iio/magnetometer/ak8975.c14
1 files changed, 3 insertions, 11 deletions
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 <linux/iio/trigger_consumer.h>
#include <linux/iio/triggered_buffer.h>
-#include <linux/iio/magnetometer/ak8975.h>
-
/*
* 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) {