Skip to content

Commit be6736c

Browse files
author
Bartosz Golaszewski
committed
gpiolib: demote the hogging log messages to debug
Drivers should be silent when they work correctly. There's no reason to emit info messages when GPIO lines are hogged. Demote the message to debug. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Suggested-by: Kent Gibson <warthog618@gmail.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
1 parent ba65c79 commit be6736c

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

drivers/gpio/gpiolib.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4236,7 +4236,7 @@ int gpiod_hog(struct gpio_desc *desc, const char *name,
42364236
/* Mark GPIO as hogged so it can be identified and removed later */
42374237
set_bit(FLAG_IS_HOGGED, &desc->flags);
42384238

4239-
gpiod_info(desc, "hogged as %s%s\n",
4239+
gpiod_dbg(desc, "hogged as %s%s\n",
42404240
(dflags & GPIOD_FLAGS_BIT_DIR_OUT) ? "output" : "input",
42414241
(dflags & GPIOD_FLAGS_BIT_DIR_OUT) ?
42424242
(dflags & GPIOD_FLAGS_BIT_DIR_VAL) ? "/high" : "/low" : "");

drivers/of/unittest.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1849,19 +1849,19 @@ static void __init of_unittest_overlay_gpio(void)
18491849
* driver is registered
18501850
*/
18511851

1852-
EXPECT_BEGIN(KERN_INFO,
1852+
EXPECT_BEGIN(KERN_DEBUG,
18531853
"gpio-<<int>> (line-B-input): hogged as input\n");
18541854

1855-
EXPECT_BEGIN(KERN_INFO,
1855+
EXPECT_BEGIN(KERN_DEBUG,
18561856
"gpio-<<int>> (line-A-input): hogged as input\n");
18571857

18581858
ret = platform_driver_register(&unittest_gpio_driver);
18591859
if (unittest(ret == 0, "could not register unittest gpio driver\n"))
18601860
return;
18611861

1862-
EXPECT_END(KERN_INFO,
1862+
EXPECT_END(KERN_DEBUG,
18631863
"gpio-<<int>> (line-A-input): hogged as input\n");
1864-
EXPECT_END(KERN_INFO,
1864+
EXPECT_END(KERN_DEBUG,
18651865
"gpio-<<int>> (line-B-input): hogged as input\n");
18661866

18671867
unittest(probe_pass_count + 2 == unittest_gpio_probe_pass_count,
@@ -1888,15 +1888,15 @@ static void __init of_unittest_overlay_gpio(void)
18881888
probe_pass_count = unittest_gpio_probe_pass_count;
18891889
chip_request_count = unittest_gpio_chip_request_count;
18901890

1891-
EXPECT_BEGIN(KERN_INFO,
1891+
EXPECT_BEGIN(KERN_DEBUG,
18921892
"gpio-<<int>> (line-D-input): hogged as input\n");
18931893

18941894
/* overlay_gpio_03 contains gpio node and child gpio hog node */
18951895

18961896
unittest(overlay_data_apply("overlay_gpio_03", NULL),
18971897
"Adding overlay 'overlay_gpio_03' failed\n");
18981898

1899-
EXPECT_END(KERN_INFO,
1899+
EXPECT_END(KERN_DEBUG,
19001900
"gpio-<<int>> (line-D-input): hogged as input\n");
19011901

19021902
unittest(probe_pass_count + 1 == unittest_gpio_probe_pass_count,
@@ -1935,15 +1935,15 @@ static void __init of_unittest_overlay_gpio(void)
19351935
* - processing gpio for overlay_gpio_04b
19361936
*/
19371937

1938-
EXPECT_BEGIN(KERN_INFO,
1938+
EXPECT_BEGIN(KERN_DEBUG,
19391939
"gpio-<<int>> (line-C-input): hogged as input\n");
19401940

19411941
/* overlay_gpio_04b contains child gpio hog node */
19421942

19431943
unittest(overlay_data_apply("overlay_gpio_04b", NULL),
19441944
"Adding overlay 'overlay_gpio_04b' failed\n");
19451945

1946-
EXPECT_END(KERN_INFO,
1946+
EXPECT_END(KERN_DEBUG,
19471947
"gpio-<<int>> (line-C-input): hogged as input\n");
19481948

19491949
unittest(chip_request_count + 1 == unittest_gpio_chip_request_count,

0 commit comments

Comments
 (0)