device-notifier: add callback that can receive user_data
typedef int (*notify_cb_udata)(void *data, void *user_data)
>> The callback has an additional parameter, user_data, for receiving
user data.
typedef void (*destroy_cb_udata)(void *user_data)
>> The callback is invoked on removing notifier with parameter
user_data.
int __register_notifier_udata(enum device_notifier_type type,
notify_cb_udata func, void *user_data, destroy_cb_udata func_destroy,
const char *caller)
>> Returns negative errno on error occured. Otherwise positive integer
that denotes notifier id, which can be used for unregistering the
notifier.
>> There are two additional parameters compared to the original
register_notifier(). One is user_data, which is passed as the
second parameter to callback and the other is func_destroy, which
is invoked on removing notifier.
>> It is allowed to register multiple notifier with same callback on a
same type, because a user_data might differ even though they have
same callback on a same type.
int __unregister_notifier_udata(int id, const char *caller)
>> Receives notifier id and unregisters matching notifier.
Change-Id: I46d1fec98eae19dbd9aaed60dfd84f760d152b9e
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>