sysfs_schedule_callback - helper to schedule a callback for a kobject
2. SYNOPSIS ▲
int sysfs_schedule_callback(struct kobject * kobj , void (* func ) (void *), void * data , struct module * owner );
3. ARGUMENTS ▲
object weAqre acting for.
callback function to invoke later.
argument to pass to func.
module owning the callback code
4. DESCRIPTION ▲
sysfs attribute methods must not unregister themselves or their parent kobject (which would amount to the same thing). Attempts to do so will deadlock, since unregistration is mutually exclusive with driver callbacks.
Instead methods can call this routine, which will attempt to allocate and schedule a workqueue request to call back func with data as its argument in the workqueueAqs process context. kobj will be pinned until func returns.
Returns 0 if the request was submitted, -ENOMEM if storage could not be allocated, -ENODEV if a reference to owner isnAqt available, -EAGAIN if a callback has already been scheduled for kobj.
5. COPYRIGHT ▲