On 2/16/26 1:54 AM, Wolfram Sang wrote: > To hide internal core structures from providers, a callback is added to > the ops which allows to set the 'priv' field of a hwspinlock. It is > called when a hwspinlock device is registered and, thus, iterated over > all locks. The register-functions are also extended to pass a data > pointer to this callback, so it can do necessary calculations for the > priv field of each hwspinlock. Providers are converted separately > because these changes need dedicated reviews. > > Signed-off-by: Wolfram Sang <[email protected]> [...]
> --- a/include/linux/hwspinlock.h > +++ b/include/linux/hwspinlock.h > @@ -30,7 +30,7 @@ struct hwspinlock_ops; > void *hwspin_lock_get_priv(struct hwspinlock *hwlock); > struct device *hwspin_lock_get_dev(struct hwspinlock *hwlock); > int hwspin_lock_register(struct hwspinlock_device *bank, struct device *dev, > - const struct hwspinlock_ops *ops, int base_id, int num_locks); > + const struct hwspinlock_ops *ops, int base_id, int num_locks, > void *init_data); > int hwspin_lock_unregister(struct hwspinlock_device *bank); > struct hwspinlock *hwspin_lock_request_specific(unsigned int id); > int hwspin_lock_free(struct hwspinlock *hwlock); > @@ -49,7 +49,7 @@ int devm_hwspin_lock_unregister(struct device *dev, > int devm_hwspin_lock_register(struct device *dev, > struct hwspinlock_device *bank, > const struct hwspinlock_ops *ops, > - int base_id, int num_locks); > + int base_id, int num_locks, void *init_data); Don't you break the existing users of this API with this change? I see you're fixing them up in the followup patches but that's not how it should be done -- the compilation shouldn't be broken... [...] MBR, Sergey
