thermal: bcm2835: Stop using printk format %pCr
authorGeert Uytterhoeven <[email protected]>
Fri, 1 Jun 2018 09:28:20 +0000 (11:28 +0200)
committerPetr Mladek <[email protected]>
Tue, 5 Jun 2018 07:43:38 +0000 (09:43 +0200)
Printk format "%pCr" will be removed soon, as clk_get_rate() must not be
called in atomic context.

Replace it by printing the variable that already holds the clock rate.
Note that calling clk_get_rate() is safe here, as the code runs in task
context.

Link: http://lkml.kernel.org/r/[email protected]
To: Jia-Ju Bai <[email protected]>
To: Jonathan Corbet <[email protected]>
To: Michael Turquette <[email protected]>
To: Stephen Boyd <[email protected]>
To: Zhang Rui <[email protected]>
To: Eduardo Valentin <[email protected]>
To: Eric Anholt <[email protected]>
To: Stefan Wahren <[email protected]>
To: Greg Kroah-Hartman <[email protected]>
Cc: Sergey Senozhatsky <[email protected]>
Cc: Petr Mladek <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Steven Rostedt <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected] # 4.12+
Signed-off-by: Geert Uytterhoeven <[email protected]>
Acked-by: Stefan Wahren <[email protected]>
Signed-off-by: Petr Mladek <[email protected]>
drivers/thermal/broadcom/bcm2835_thermal.c

index a4d6a0e2e9938190a3bd0c6d081a02bbd6f209fd..23ad4f9f21438e45a819da46962025eeeb922590 100644 (file)
@@ -213,8 +213,8 @@ static int bcm2835_thermal_probe(struct platform_device *pdev)
        rate = clk_get_rate(data->clk);
        if ((rate < 1920000) || (rate > 5000000))
                dev_warn(&pdev->dev,
-                        "Clock %pCn running at %pCr Hz is outside of the recommended range: 1.92 to 5MHz\n",
-                        data->clk, data->clk);
+                        "Clock %pCn running at %lu Hz is outside of the recommended range: 1.92 to 5MHz\n",
+                        data->clk, rate);
 
        /* register of thermal sensor and get info from DT */
        tz = thermal_zone_of_sensor_register(&pdev->dev, 0, data,