iio: st_sensors: announce registered sensors
authorLinus Walleij <linus.walleij@linaro.org>
Sun, 13 Apr 2014 19:08:00 +0000 (20:08 +0100)
committerJonathan Cameron <jic23@kernel.org>
Sat, 26 Apr 2014 10:50:59 +0000 (11:50 +0100)
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>
drivers/iio/accel/st_accel_core.c
drivers/iio/gyro/st_gyro_core.c
drivers/iio/magnetometer/st_magn_core.c
drivers/iio/pressure/st_pressure_core.c

index 38caedc76b98f20520f9be751fabc15e90b03793..4e06fcf5b8915606a8fdf4feda0e3d9bd4198d07 100644 (file)
@@ -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:
index a8e174a47bc409cc22ece45c5a971ca3fe14f37d..bc71f4d1e2ce4e68e64862539c61ee60da036cb0 100644 (file)
@@ -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:
index 52bbcfa1e07795208b45633ced62de0015772b74..8e33a7682d33eb69c38e80cfb219d38fc29f19f0 100644 (file)
@@ -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:
index 7418768ed49c62ef830d071f84f7506729129369..013becbe8f479a7e1a5c70e333555c64a8f196a8 100644 (file)
@@ -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: