diff mbox

power: reset: at91-reset: Switch from the pr_*() to the dev_*() logging functions

Message ID 20180316100626.GC26372@lenoch (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Ladislav Michl March 16, 2018, 10:06 a.m. UTC
Use dev_info() instead of pr_info().

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
---
 Hi,

 I took a chance to constify and move reason variable in one patch.
 If you do think it should be a separate patch, let me know.

 drivers/power/reset/at91-reset.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Nicolas Ferre March 16, 2018, 11:16 a.m. UTC | #1
On 16/03/2018 at 11:06, Ladislav Michl wrote:
> Use dev_info() instead of pr_info().
> 
> Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
> ---
>   Hi,
> 
>   I took a chance to constify and move reason variable in one patch.
>   If you do think it should be a separate patch, let me know.

Ok
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>

>   drivers/power/reset/at91-reset.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/power/reset/at91-reset.c b/drivers/power/reset/at91-reset.c
> index b99769f8ab15..f44a9ffcc2ab 100644
> --- a/drivers/power/reset/at91-reset.c
> +++ b/drivers/power/reset/at91-reset.c
> @@ -145,8 +145,8 @@ static int samx7_restart(struct notifier_block *this, unsigned long mode,
>   
>   static void __init at91_reset_status(struct platform_device *pdev)
>   {
> +	const char *reason;
>   	u32 reg = readl(at91_rstc_base + AT91_RSTC_SR);
> -	char *reason;
>   
>   	switch ((reg & AT91_RSTC_RSTTYP) >> 8) {
>   	case RESET_TYPE_GENERAL:
> @@ -169,7 +169,7 @@ static void __init at91_reset_status(struct platform_device *pdev)
>   		break;
>   	}
>   
> -	pr_info("AT91: Starting after %s\n", reason);
> +	dev_info(&pdev->dev, "Starting after %s\n", reason);
>   }
>   
>   static const struct of_device_id at91_ramc_of_match[] = {
>
diff mbox

Patch

diff --git a/drivers/power/reset/at91-reset.c b/drivers/power/reset/at91-reset.c
index b99769f8ab15..f44a9ffcc2ab 100644
--- a/drivers/power/reset/at91-reset.c
+++ b/drivers/power/reset/at91-reset.c
@@ -145,8 +145,8 @@  static int samx7_restart(struct notifier_block *this, unsigned long mode,
 
 static void __init at91_reset_status(struct platform_device *pdev)
 {
+	const char *reason;
 	u32 reg = readl(at91_rstc_base + AT91_RSTC_SR);
-	char *reason;
 
 	switch ((reg & AT91_RSTC_RSTTYP) >> 8) {
 	case RESET_TYPE_GENERAL:
@@ -169,7 +169,7 @@  static void __init at91_reset_status(struct platform_device *pdev)
 		break;
 	}
 
-	pr_info("AT91: Starting after %s\n", reason);
+	dev_info(&pdev->dev, "Starting after %s\n", reason);
 }
 
 static const struct of_device_id at91_ramc_of_match[] = {