forked from Minki/linux
iio: st_sensors: announce registered sensors
It is pretty helpful to know already from dmesg that a certain device is successfully registered, instead of having to browse sysfs to see if it's actually there. Cc: Lee Jones <lee.jones@linaro.org> Cc: Denis CIOCCA <denis.ciocca@st.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
This commit is contained in:
parent
e3c5be2bda
commit
4f544ced19
@ -496,6 +496,9 @@ int st_accel_common_probe(struct iio_dev *indio_dev,
|
||||
if (err)
|
||||
goto st_accel_device_register_error;
|
||||
|
||||
dev_info(&indio_dev->dev, "registered accelerometer %s\n",
|
||||
indio_dev->name);
|
||||
|
||||
return 0;
|
||||
|
||||
st_accel_device_register_error:
|
||||
|
@ -344,6 +344,9 @@ int st_gyro_common_probe(struct iio_dev *indio_dev,
|
||||
if (err)
|
||||
goto st_gyro_device_register_error;
|
||||
|
||||
dev_info(&indio_dev->dev, "registered gyroscope %s\n",
|
||||
indio_dev->name);
|
||||
|
||||
return 0;
|
||||
|
||||
st_gyro_device_register_error:
|
||||
|
@ -387,6 +387,9 @@ int st_magn_common_probe(struct iio_dev *indio_dev,
|
||||
if (err)
|
||||
goto st_magn_device_register_error;
|
||||
|
||||
dev_info(&indio_dev->dev, "registered magnetometer %s\n",
|
||||
indio_dev->name);
|
||||
|
||||
return 0;
|
||||
|
||||
st_magn_device_register_error:
|
||||
|
@ -474,6 +474,9 @@ int st_press_common_probe(struct iio_dev *indio_dev,
|
||||
if (err)
|
||||
goto st_press_device_register_error;
|
||||
|
||||
dev_info(&indio_dev->dev, "registered pressure sensor %s\n",
|
||||
indio_dev->name);
|
||||
|
||||
return err;
|
||||
|
||||
st_press_device_register_error:
|
||||
|
Loading…
Reference in New Issue
Block a user