Commit 48edc374 authored by Irina Tirdea's avatar Irina Tirdea Committed by Jonathan Cameron

iio: magn: ak8975: fix unnecessary casting between char* and const char*

Use const char* instead of casting const char* to char*.
Signed-off-by: default avatarIrina Tirdea <irina.tirdea@intel.com>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent ef1c6b23
...@@ -477,8 +477,8 @@ static const struct acpi_device_id ak_acpi_match[] = { ...@@ -477,8 +477,8 @@ static const struct acpi_device_id ak_acpi_match[] = {
}; };
MODULE_DEVICE_TABLE(acpi, ak_acpi_match); MODULE_DEVICE_TABLE(acpi, ak_acpi_match);
static char *ak8975_match_acpi_device(struct device *dev, static const char *ak8975_match_acpi_device(struct device *dev,
enum asahi_compass_chipset *chipset) enum asahi_compass_chipset *chipset)
{ {
const struct acpi_device_id *id; const struct acpi_device_id *id;
...@@ -487,7 +487,7 @@ static char *ak8975_match_acpi_device(struct device *dev, ...@@ -487,7 +487,7 @@ static char *ak8975_match_acpi_device(struct device *dev,
return NULL; return NULL;
*chipset = (int)id->driver_data; *chipset = (int)id->driver_data;
return (char *)dev_name(dev); return dev_name(dev);
} }
static int ak8975_probe(struct i2c_client *client, static int ak8975_probe(struct i2c_client *client,
...@@ -497,7 +497,7 @@ 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; struct iio_dev *indio_dev;
int eoc_gpio; int eoc_gpio;
int err; int err;
char *name = NULL; const char *name = NULL;
/* Grab and set up the supplied GPIO. */ /* Grab and set up the supplied GPIO. */
if (client->dev.platform_data) if (client->dev.platform_data)
...@@ -539,7 +539,7 @@ static int ak8975_probe(struct i2c_client *client, ...@@ -539,7 +539,7 @@ static int ak8975_probe(struct i2c_client *client,
if (id) { if (id) {
data->chipset = data->chipset =
(enum asahi_compass_chipset)(id->driver_data); (enum asahi_compass_chipset)(id->driver_data);
name = (char *) id->name; name = id->name;
} else if (ACPI_HANDLE(&client->dev)) } else if (ACPI_HANDLE(&client->dev))
name = ak8975_match_acpi_device(&client->dev, &data->chipset); name = ak8975_match_acpi_device(&client->dev, &data->chipset);
else else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment