diff options
author | Irina Tirdea <irina.tirdea@intel.com> | 2014-08-09 10:18:00 -0400 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2014-09-14 13:31:11 -0400 |
commit | 48edc3748142ad393c6ee2bfcc1eb256e9f88b38 (patch) | |
tree | d80abcd02e437b2f18c8c9d66db9e3919f9d6a84 /drivers/iio | |
parent | ef1c6b23355b70356ca18c0d4c39b25dfbd7be02 (diff) |
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')
-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[] = { | |||
477 | }; | 477 | }; |
478 | MODULE_DEVICE_TABLE(acpi, ak_acpi_match); | 478 | MODULE_DEVICE_TABLE(acpi, ak_acpi_match); |
479 | 479 | ||
480 | static char *ak8975_match_acpi_device(struct device *dev, | 480 | static const char *ak8975_match_acpi_device(struct device *dev, |
481 | enum asahi_compass_chipset *chipset) | 481 | enum asahi_compass_chipset *chipset) |
482 | { | 482 | { |
483 | const struct acpi_device_id *id; | 483 | const struct acpi_device_id *id; |
484 | 484 | ||
@@ -487,7 +487,7 @@ static char *ak8975_match_acpi_device(struct device *dev, | |||
487 | return NULL; | 487 | return NULL; |
488 | *chipset = (int)id->driver_data; | 488 | *chipset = (int)id->driver_data; |
489 | 489 | ||
490 | return (char *)dev_name(dev); | 490 | return dev_name(dev); |
491 | } | 491 | } |
492 | 492 | ||
493 | static int ak8975_probe(struct i2c_client *client, | 493 | static int ak8975_probe(struct i2c_client *client, |
@@ -497,7 +497,7 @@ static int ak8975_probe(struct i2c_client *client, | |||
497 | struct iio_dev *indio_dev; | 497 | struct iio_dev *indio_dev; |
498 | int eoc_gpio; | 498 | int eoc_gpio; |
499 | int err; | 499 | int err; |
500 | char *name = NULL; | 500 | const char *name = NULL; |
501 | 501 | ||
502 | /* Grab and set up the supplied GPIO. */ | 502 | /* Grab and set up the supplied GPIO. */ |
503 | if (client->dev.platform_data) | 503 | if (client->dev.platform_data) |
@@ -539,7 +539,7 @@ static int ak8975_probe(struct i2c_client *client, | |||
539 | if (id) { | 539 | if (id) { |
540 | data->chipset = | 540 | data->chipset = |
541 | (enum asahi_compass_chipset)(id->driver_data); | 541 | (enum asahi_compass_chipset)(id->driver_data); |
542 | name = (char *) id->name; | 542 | name = id->name; |
543 | } else if (ACPI_HANDLE(&client->dev)) | 543 | } else if (ACPI_HANDLE(&client->dev)) |
544 | name = ak8975_match_acpi_device(&client->dev, &data->chipset); | 544 | name = ak8975_match_acpi_device(&client->dev, &data->chipset); |
545 | else | 545 | else |