diff options
author | Irina Tirdea <irina.tirdea@intel.com> | 2014-08-09 15:18:00 +0100 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2014-09-14 18:31:11 +0100 |
commit | 48edc3748142ad393c6ee2bfcc1eb256e9f88b38 (patch) | |
tree | d80abcd02e437b2f18c8c9d66db9e3919f9d6a84 /drivers/iio/magnetometer/ak8975.c | |
parent | ef1c6b23355b70356ca18c0d4c39b25dfbd7be02 (diff) | |
download | talos-obmc-linux-48edc3748142ad393c6ee2bfcc1eb256e9f88b38.tar.gz talos-obmc-linux-48edc3748142ad393c6ee2bfcc1eb256e9f88b38.zip |
iio: magn: ak8975: fix unnecessary casting between char* and const char*
Use const char* instead of casting const char* to char*.
Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio/magnetometer/ak8975.c')
-rw-r--r-- | drivers/iio/magnetometer/ak8975.c | 10 |
1 files changed, 5 insertions, 5 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 |