diff options
Diffstat (limited to 'drivers/staging/iio/light/isl29018.c')
-rw-r--r-- | drivers/staging/iio/light/isl29018.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/staging/iio/light/isl29018.c b/drivers/staging/iio/light/isl29018.c index dfbc423..307c664 100644 --- a/drivers/staging/iio/light/isl29018.c +++ b/drivers/staging/iio/light/isl29018.c @@ -402,16 +402,6 @@ static ssize_t show_proxim_ir(struct device *dev, return get_sensor_data(dev, buf, COMMMAND1_OPMODE_PROX_ONCE); } -/* Read name */ -static ssize_t show_name(struct device *dev, - struct device_attribute *attr, char *buf) -{ - struct iio_dev *indio_dev = dev_get_drvdata(dev); - struct isl29018_chip *chip = indio_dev->dev_data; - - return sprintf(buf, "%s\n", chip->client->name); -} - static IIO_DEVICE_ATTR(range, S_IRUGO | S_IWUSR, show_range, store_range, 0); static IIO_CONST_ATTR(range_available, "1000 4000 16000 64000"); static IIO_CONST_ATTR(adc_resolution_available, "4 8 12 16"); @@ -424,12 +414,10 @@ static IIO_DEVICE_ATTR(proximity_on_chip_ambient_infrared_supression, static IIO_DEVICE_ATTR(illuminance0_input, S_IRUGO, show_lux, NULL, 0); static IIO_DEVICE_ATTR(intensity_infrared_raw, S_IRUGO, show_ir, NULL, 0); static IIO_DEVICE_ATTR(proximity_raw, S_IRUGO, show_proxim_ir, NULL, 0); -static IIO_DEVICE_ATTR(name, S_IRUGO, show_name, NULL, 0); #define ISL29018_DEV_ATTR(name) (&iio_dev_attr_##name.dev_attr.attr) #define ISL29018_CONST_ATTR(name) (&iio_const_attr_##name.dev_attr.attr) static struct attribute *isl29018_attributes[] = { - ISL29018_DEV_ATTR(name), ISL29018_DEV_ATTR(range), ISL29018_CONST_ATTR(range_available), ISL29018_DEV_ATTR(adc_resolution), @@ -498,6 +486,7 @@ static int __devinit isl29018_probe(struct i2c_client *client, goto exit_free; } chip->indio_dev->attrs = &isl29108_group; + chip->indio_dev->name = id->name; chip->indio_dev->dev.parent = &client->dev; chip->indio_dev->dev_data = (void *)(chip); chip->indio_dev->driver_module = THIS_MODULE; |