diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2020-01-20 11:25:50 +0200 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2020-02-14 12:08:09 +0000 |
commit | 357528156207bbd21df89a287ef98eccd5fb64c3 (patch) | |
tree | 8e829016e10eb0e4cde6df4d7ccdbec0b73e5ff9 | |
parent | a8cf1723c4b794f49d0906f9ddc9d1ac52af4ee2 (diff) |
iio: accel: st_accel: Use st_sensors_dev_name_probe()
Use st_sensors_dev_name_probe() instead open coded variant.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-rw-r--r-- | drivers/iio/accel/st_accel_i2c.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/iio/accel/st_accel_i2c.c b/drivers/iio/accel/st_accel_i2c.c index 633955d764cc..8c489312f668 100644 --- a/drivers/iio/accel/st_accel_i2c.c +++ b/drivers/iio/accel/st_accel_i2c.c @@ -147,12 +147,9 @@ static int st_accel_i2c_probe(struct i2c_client *client) const struct st_sensor_settings *settings; struct st_sensor_data *adata; struct iio_dev *indio_dev; - const char *match; int ret; - match = device_get_match_data(&client->dev); - if (match) - strlcpy(client->name, match, sizeof(client->name)); + st_sensors_dev_name_probe(&client->dev, client->name, sizeof(client->name)); settings = st_accel_get_settings(client->name); if (!settings) { |