diff options
author | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2013-03-10 13:00:02 -0400 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2013-03-15 08:33:54 -0400 |
commit | 9a643c9a11259955ec6961f9a2509604c6df1cd9 (patch) | |
tree | 5409bd18f34a0d16025c672cb2a1fb6d14054e1c | |
parent | 9fddc4a589c6d1bd9c935d445b1a1d216b1457ab (diff) |
sh-pfc: Convert message printing from pr_* to dev_*
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r-- | drivers/pinctrl/sh-pfc/core.c | 14 | ||||
-rw-r--r-- | drivers/pinctrl/sh-pfc/gpio.c | 16 | ||||
-rw-r--r-- | drivers/pinctrl/sh-pfc/pinctrl.c | 5 |
3 files changed, 20 insertions, 15 deletions
diff --git a/drivers/pinctrl/sh-pfc/core.c b/drivers/pinctrl/sh-pfc/core.c index a04c497deccd..feef89792568 100644 --- a/drivers/pinctrl/sh-pfc/core.c +++ b/drivers/pinctrl/sh-pfc/core.c | |||
@@ -10,7 +10,6 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #define DRV_NAME "sh-pfc" | 12 | #define DRV_NAME "sh-pfc" |
13 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
14 | 13 | ||
15 | #include <linux/bitops.h> | 14 | #include <linux/bitops.h> |
16 | #include <linux/err.h> | 15 | #include <linux/err.h> |
@@ -173,9 +172,9 @@ static void sh_pfc_write_config_reg(struct sh_pfc *pfc, | |||
173 | 172 | ||
174 | sh_pfc_config_reg_helper(pfc, crp, field, &mapped_reg, &mask, &pos); | 173 | sh_pfc_config_reg_helper(pfc, crp, field, &mapped_reg, &mask, &pos); |
175 | 174 | ||
176 | pr_debug("write_reg addr = %lx, value = %ld, field = %ld, " | 175 | dev_dbg(pfc->dev, "write_reg addr = %lx, value = %ld, field = %ld, " |
177 | "r_width = %ld, f_width = %ld\n", | 176 | "r_width = %ld, f_width = %ld\n", |
178 | crp->reg, value, field, crp->reg_width, crp->field_width); | 177 | crp->reg, value, field, crp->reg_width, crp->field_width); |
179 | 178 | ||
180 | mask = ~(mask << pos); | 179 | mask = ~(mask << pos); |
181 | value = value << pos; | 180 | value = value << pos; |
@@ -254,7 +253,8 @@ static int sh_pfc_mark_to_enum(struct sh_pfc *pfc, pinmux_enum_t mark, int pos, | |||
254 | } | 253 | } |
255 | } | 254 | } |
256 | 255 | ||
257 | pr_err("cannot locate data/mark enum_id for mark %d\n", mark); | 256 | dev_err(pfc->dev, "cannot locate data/mark enum_id for mark %d\n", |
257 | mark); | ||
258 | return -EINVAL; | 258 | return -EINVAL; |
259 | } | 259 | } |
260 | 260 | ||
@@ -396,13 +396,13 @@ static int sh_pfc_probe(struct platform_device *pdev) | |||
396 | * PFC state as it is, given that there are already | 396 | * PFC state as it is, given that there are already |
397 | * extant users of it that have succeeded by this point. | 397 | * extant users of it that have succeeded by this point. |
398 | */ | 398 | */ |
399 | pr_notice("failed to init GPIO chip, ignoring...\n"); | 399 | dev_notice(pfc->dev, "failed to init GPIO chip, ignoring...\n"); |
400 | } | 400 | } |
401 | #endif | 401 | #endif |
402 | 402 | ||
403 | platform_set_drvdata(pdev, pfc); | 403 | platform_set_drvdata(pdev, pfc); |
404 | 404 | ||
405 | pr_info("%s support registered\n", info->name); | 405 | dev_info(pfc->dev, "%s support registered\n", info->name); |
406 | 406 | ||
407 | return 0; | 407 | return 0; |
408 | } | 408 | } |
diff --git a/drivers/pinctrl/sh-pfc/gpio.c b/drivers/pinctrl/sh-pfc/gpio.c index e299f14bc50a..d7acb06d888c 100644 --- a/drivers/pinctrl/sh-pfc/gpio.c +++ b/drivers/pinctrl/sh-pfc/gpio.c | |||
@@ -9,8 +9,6 @@ | |||
9 | * for more details. | 9 | * for more details. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #define pr_fmt(fmt) KBUILD_MODNAME " gpio: " fmt | ||
13 | |||
14 | #include <linux/device.h> | 12 | #include <linux/device.h> |
15 | #include <linux/gpio.h> | 13 | #include <linux/gpio.h> |
16 | #include <linux/init.h> | 14 | #include <linux/init.h> |
@@ -273,12 +271,18 @@ static int gpio_pin_setup(struct sh_pfc_chip *chip) | |||
273 | 271 | ||
274 | static int gpio_function_request(struct gpio_chip *gc, unsigned offset) | 272 | static int gpio_function_request(struct gpio_chip *gc, unsigned offset) |
275 | { | 273 | { |
274 | static bool __print_once; | ||
276 | struct sh_pfc *pfc = gpio_to_pfc(gc); | 275 | struct sh_pfc *pfc = gpio_to_pfc(gc); |
277 | unsigned int mark = pfc->info->func_gpios[offset].enum_id; | 276 | unsigned int mark = pfc->info->func_gpios[offset].enum_id; |
278 | unsigned long flags; | 277 | unsigned long flags; |
279 | int ret; | 278 | int ret; |
280 | 279 | ||
281 | pr_notice_once("Use of GPIO API for function requests is deprecated, convert to pinctrl\n"); | 280 | if (!__print_once) { |
281 | dev_notice(pfc->dev, | ||
282 | "Use of GPIO API for function requests is deprecated." | ||
283 | " Convert to pinctrl\n"); | ||
284 | __print_once = true; | ||
285 | } | ||
282 | 286 | ||
283 | if (mark == 0) | 287 | if (mark == 0) |
284 | return -EINVAL; | 288 | return -EINVAL; |
@@ -334,9 +338,9 @@ sh_pfc_add_gpiochip(struct sh_pfc *pfc, int(*setup)(struct sh_pfc_chip *)) | |||
334 | if (unlikely(ret < 0)) | 338 | if (unlikely(ret < 0)) |
335 | return ERR_PTR(ret); | 339 | return ERR_PTR(ret); |
336 | 340 | ||
337 | pr_info("%s handling gpio %u -> %u\n", | 341 | dev_info(pfc->dev, "%s handling gpio %u -> %u\n", |
338 | chip->gpio_chip.label, chip->gpio_chip.base, | 342 | chip->gpio_chip.label, chip->gpio_chip.base, |
339 | chip->gpio_chip.base + chip->gpio_chip.ngpio - 1); | 343 | chip->gpio_chip.base + chip->gpio_chip.ngpio - 1); |
340 | 344 | ||
341 | return chip; | 345 | return chip; |
342 | } | 346 | } |
diff --git a/drivers/pinctrl/sh-pfc/pinctrl.c b/drivers/pinctrl/sh-pfc/pinctrl.c index 82e4fb21853e..52179bbcf6b4 100644 --- a/drivers/pinctrl/sh-pfc/pinctrl.c +++ b/drivers/pinctrl/sh-pfc/pinctrl.c | |||
@@ -9,7 +9,6 @@ | |||
9 | */ | 9 | */ |
10 | 10 | ||
11 | #define DRV_NAME "sh-pfc" | 11 | #define DRV_NAME "sh-pfc" |
12 | #define pr_fmt(fmt) KBUILD_MODNAME " pinctrl: " fmt | ||
13 | 12 | ||
14 | #include <linux/device.h> | 13 | #include <linux/device.h> |
15 | #include <linux/err.h> | 14 | #include <linux/err.h> |
@@ -176,7 +175,9 @@ static int sh_pfc_gpio_request_enable(struct pinctrl_dev *pctldev, | |||
176 | spin_lock_irqsave(&pfc->lock, flags); | 175 | spin_lock_irqsave(&pfc->lock, flags); |
177 | 176 | ||
178 | if (cfg->type != PINMUX_TYPE_NONE) { | 177 | if (cfg->type != PINMUX_TYPE_NONE) { |
179 | pr_err("Pin %u is busy, can't configure it as GPIO.\n", offset); | 178 | dev_err(pfc->dev, |
179 | "Pin %u is busy, can't configure it as GPIO.\n", | ||
180 | offset); | ||
180 | ret = -EBUSY; | 181 | ret = -EBUSY; |
181 | goto done; | 182 | goto done; |
182 | } | 183 | } |