diff options
Diffstat (limited to 'drivers/iio/magnetometer')
-rw-r--r-- | drivers/iio/magnetometer/ak8975.c | 10 | ||||
-rw-r--r-- | drivers/iio/magnetometer/hid-sensor-magn-3d.c | 8 |
2 files changed, 7 insertions, 11 deletions
diff --git a/drivers/iio/magnetometer/ak8975.c b/drivers/iio/magnetometer/ak8975.c index a2357921d761..bf5ef077e791 100644 --- a/drivers/iio/magnetometer/ak8975.c +++ b/drivers/iio/magnetometer/ak8975.c @@ -477,8 +477,8 @@ static const struct acpi_device_id ak_acpi_match[] = { }; MODULE_DEVICE_TABLE(acpi, ak_acpi_match); -static char *ak8975_match_acpi_device(struct device *dev, - enum asahi_compass_chipset *chipset) +static const char *ak8975_match_acpi_device(struct device *dev, + enum asahi_compass_chipset *chipset) { const struct acpi_device_id *id; @@ -487,7 +487,7 @@ static char *ak8975_match_acpi_device(struct device *dev, return NULL; *chipset = (int)id->driver_data; - return (char *)dev_name(dev); + return dev_name(dev); } static int ak8975_probe(struct i2c_client *client, @@ -497,7 +497,7 @@ static int ak8975_probe(struct i2c_client *client, struct iio_dev *indio_dev; int eoc_gpio; int err; - char *name = NULL; + const char *name = NULL; /* Grab and set up the supplied GPIO. */ if (client->dev.platform_data) @@ -539,7 +539,7 @@ static int ak8975_probe(struct i2c_client *client, if (id) { data->chipset = (enum asahi_compass_chipset)(id->driver_data); - name = (char *) id->name; + name = id->name; } else if (ACPI_HANDLE(&client->dev)) name = ak8975_match_acpi_device(&client->dev, &data->chipset); else diff --git a/drivers/iio/magnetometer/hid-sensor-magn-3d.c b/drivers/iio/magnetometer/hid-sensor-magn-3d.c index 3ec777a8f64e..6294575d2777 100644 --- a/drivers/iio/magnetometer/hid-sensor-magn-3d.c +++ b/drivers/iio/magnetometer/hid-sensor-magn-3d.c @@ -246,8 +246,7 @@ static const struct iio_info magn_3d_info = { }; /* Function to push data to buffer */ -static void hid_sensor_push_data(struct iio_dev *indio_dev, const void *data, - int len) +static void hid_sensor_push_data(struct iio_dev *indio_dev, const void *data) { dev_dbg(&indio_dev->dev, "hid_sensor_push_data\n"); iio_push_to_buffers(indio_dev, data); @@ -263,9 +262,7 @@ static int magn_3d_proc_event(struct hid_sensor_hub_device *hsdev, dev_dbg(&indio_dev->dev, "magn_3d_proc_event\n"); if (atomic_read(&magn_state->common_attributes.data_ready)) - hid_sensor_push_data(indio_dev, - magn_state->iio_vals, - sizeof(magn_state->iio_vals)); + hid_sensor_push_data(indio_dev, magn_state->iio_vals); return 0; } @@ -533,7 +530,6 @@ static struct platform_driver hid_magn_3d_platform_driver = { .id_table = hid_magn_3d_ids, .driver = { .name = KBUILD_MODNAME, - .owner = THIS_MODULE, }, .probe = hid_magn_3d_probe, .remove = hid_magn_3d_remove, |