Commit f4cce696 authored by Chanwoo Choi's avatar Chanwoo Choi Committed by Greg Kroah-Hartman

Extcon: Notify changed state for only one cable to notifee

This patch inform the state of only one cable instead of previous data
including the state of 32 cables to notifee which use
function to monitor whether the specific cable is attachd or detached.
Signed-off-by: default avatarChanwoo Choi <>
Signed-off-by: default avatarMyungjoo Ham <>
Signed-off-by: default avatarKyungmin Park <>
Signed-off-by: default avatarGreg Kroah-Hartman <>
parent a1d26ac0
......@@ -425,8 +425,15 @@ static int _call_per_cable(struct notifier_block *nb, unsigned long val,
if ((val & (1 << obj->cable_index)) !=
(edev->state & (1 << obj->cable_index))) {
bool cable_state = true;
obj->previous_value = val;
return obj->user_nb->notifier_call(obj->user_nb, val, ptr);
if (val & (1 << obj->cable_index))
cable_state = false;
return obj->user_nb->notifier_call(obj->user_nb,
cable_state, ptr);
return NOTIFY_OK;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment