Commit 4f544ced authored by Linus Walleij's avatar Linus Walleij Committed by Jonathan Cameron

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: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent e3c5be2b
......@@ -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:
......
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