From: Linus Walleij Date: Sun, 13 Apr 2014 19:08:00 +0000 (+0100) Subject: iio: st_sensors: announce registered sensors X-Git-Tag: v4.14-rc1~7083^2~39^2~1228^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4f544ced19b3d300ac11414b68a676a2c42f6d06;p=platform%2Fkernel%2Flinux-rpi.git 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 Cc: Denis CIOCCA Signed-off-by: Linus Walleij Signed-off-by: Jonathan Cameron --- diff --git a/drivers/iio/accel/st_accel_core.c b/drivers/iio/accel/st_accel_core.c index 38caedc76b98..4e06fcf5b891 100644 --- a/drivers/iio/accel/st_accel_core.c +++ b/drivers/iio/accel/st_accel_core.c @@ -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: diff --git a/drivers/iio/gyro/st_gyro_core.c b/drivers/iio/gyro/st_gyro_core.c index a8e174a47bc4..bc71f4d1e2ce 100644 --- a/drivers/iio/gyro/st_gyro_core.c +++ b/drivers/iio/gyro/st_gyro_core.c @@ -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: diff --git a/drivers/iio/magnetometer/st_magn_core.c b/drivers/iio/magnetometer/st_magn_core.c index 52bbcfa1e077..8e33a7682d33 100644 --- a/drivers/iio/magnetometer/st_magn_core.c +++ b/drivers/iio/magnetometer/st_magn_core.c @@ -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: diff --git a/drivers/iio/pressure/st_pressure_core.c b/drivers/iio/pressure/st_pressure_core.c index 7418768ed49c..013becbe8f47 100644 --- a/drivers/iio/pressure/st_pressure_core.c +++ b/drivers/iio/pressure/st_pressure_core.c @@ -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: