summaryrefslogtreecommitdiff
path: root/include/linux/leds.h
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2022-12-28 12:32:38 +0300
committerLee Jones <lee@kernel.org>2023-01-30 11:03:34 +0300
commita82c7cf803d98751cd3ddb35828faad925d71982 (patch)
treea11ac4388a9408d3ef0d97f0accb8ca8f73a47be /include/linux/leds.h
parent4934630409cb6042621d760210bbd3d734daba5d (diff)
downloadlinux-a82c7cf803d98751cd3ddb35828faad925d71982.tar.xz
leds: is31fl319x: Wrap mutex_destroy() for devm_add_action_or_rest()
Clang complains that devm_add_action() takes a parameter with a wrong type: warning: cast from 'void (*)(struct mutex *)' to 'void (*)(void *)' converts to incompatible function type [-Wcast-function-type-strict] err = devm_add_action(dev, (void (*)(void *))mutex_destroy, &is31->lock); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 warning generated. It appears that the commit e1af5c815586 ("leds: is31fl319x: Fix devm vs. non-devm ordering") missed two things: - whilst the commit mentions devm_add_action_or_reset() the actual change utilised devm_add_action() call by mistake - strictly speaking the parameter is not compatible by type Fix both issues by switching to devm_add_action_or_reset() and adding a wrapper for mutex_destroy() call. Reported-by: kernel test robot <lkp@intel.com> Fixes: e1af5c815586 ("leds: is31fl319x: Fix devm vs. non-devm ordering") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Vincent Knecht <vincent.knecht@mailoo.org> Signed-off-by: Lee Jones <lee@kernel.org> Link: https://lore.kernel.org/r/20221228093238.82713-1-andriy.shevchenko@linux.intel.com
Diffstat (limited to 'include/linux/leds.h')
0 files changed, 0 insertions, 0 deletions