Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

dpll: export __dpll_pin_change_ntf() for use under dpll_lock

Export __dpll_pin_change_ntf() so that drivers can send pin change
notifications from within pin callbacks, which are already called
under dpll_lock. Using dpll_pin_change_ntf() in that context would
deadlock.

Add lockdep_assert_held() to catch misuse without the lock held.

Acked-by: Vadim Fedorenko <vadim.fedorenko@linux.dev>
Signed-off-by: Ivan Vecera <ivecera@redhat.com>
Signed-off-by: Petr Oros <poros@redhat.com>
Tested-by: Alexander Nowlin <alexander.nowlin@intel.com>
Reviewed-by: Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Link: https://patch.msgid.link/20260427-jk-iwl-net-petr-oros-fixes-v1-9-cdcb48303fd8@intel.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>

authored by

Ivan Vecera and committed by
Paolo Abeni
620055cb 6f9d8393

+11 -2
+10
drivers/dpll/dpll_netlink.c
··· 900 900 return dpll_pin_event_send(DPLL_CMD_PIN_DELETE_NTF, pin); 901 901 } 902 902 903 + /** 904 + * __dpll_pin_change_ntf - notify that the pin has been changed 905 + * @pin: registered pin pointer 906 + * 907 + * Context: caller must hold dpll_lock. Suitable for use inside pin 908 + * callbacks which are already invoked under dpll_lock. 909 + * Return: 0 if succeeds, error code otherwise. 910 + */ 903 911 int __dpll_pin_change_ntf(struct dpll_pin *pin) 904 912 { 913 + lockdep_assert_held(&dpll_lock); 905 914 dpll_pin_notify(pin, DPLL_PIN_CHANGED); 906 915 return dpll_pin_event_send(DPLL_CMD_PIN_CHANGE_NTF, pin); 907 916 } 917 + EXPORT_SYMBOL_GPL(__dpll_pin_change_ntf); 908 918 909 919 /** 910 920 * dpll_pin_change_ntf - notify that the pin has been changed
-2
drivers/dpll/dpll_netlink.h
··· 11 11 int dpll_pin_create_ntf(struct dpll_pin *pin); 12 12 13 13 int dpll_pin_delete_ntf(struct dpll_pin *pin); 14 - 15 - int __dpll_pin_change_ntf(struct dpll_pin *pin);
+1
include/linux/dpll.h
··· 286 286 287 287 int dpll_device_change_ntf(struct dpll_device *dpll); 288 288 289 + int __dpll_pin_change_ntf(struct dpll_pin *pin); 289 290 int dpll_pin_change_ntf(struct dpll_pin *pin); 290 291 291 292 int register_dpll_notifier(struct notifier_block *nb);