Staging: iio: replace pr_* with dev_*
authorHaneen Mohammed <hamohammed.sa@gmail.com>
Wed, 18 Mar 2015 10:12:07 +0000 (13:12 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Mar 2015 10:21:33 +0000 (11:21 +0100)
dev_* is prefered over pr_* when appropriate device stuct is present.
This patch replace pr_err and pr_warn with its dev_ counterpart.

Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/iio/resolver/ad2s1210.c

index 1d8c5c0bdc8875afe5f85e54a472bb5c6fa217dc..5b1daeacac7a22ef0576f861acf94a591734d5ef 100644 (file)
@@ -151,7 +151,7 @@ int ad2s1210_update_frequency_control_word(struct ad2s1210_state *st)
 
        fcw = (unsigned char)(st->fexcit * (1 << 15) / st->fclkin);
        if (fcw < AD2S1210_MIN_FCW || fcw > AD2S1210_MAX_FCW) {
-               pr_err("ad2s1210: FCW out of range\n");
+               dev_err(&st->sdev->dev, "ad2s1210: FCW out of range\n");
                return -ERANGE;
        }
 
@@ -317,7 +317,7 @@ static ssize_t ad2s1210_store_control(struct device *dev,
        if (st->pdata->gpioin) {
                data = ad2s1210_read_resolution_pin(st);
                if (data != st->resolution)
-                       pr_warn("ad2s1210: resolution settings not match\n");
+                       dev_warn(dev, "ad2s1210: resolution settings not match\n");
        } else
                ad2s1210_set_resolution_pin(st);
 
@@ -378,7 +378,7 @@ static ssize_t ad2s1210_store_resolution(struct device *dev,
        if (st->pdata->gpioin) {
                data = ad2s1210_read_resolution_pin(st);
                if (data != st->resolution)
-                       pr_warn("ad2s1210: resolution settings not match\n");
+                       dev_warn(dev, "ad2s1210: resolution settings not match\n");
        } else
                ad2s1210_set_resolution_pin(st);
        ret = len;