From bf63442382f997f3dd3ef9bf25ed33282d219064 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Pali=20Roh=C3=A1r?= Date: Sat, 15 Sep 2012 13:16:34 +0200 Subject: [PATCH] bq2415x_charger.patch: Make sure that hook function can be called for init reported mode --- .../debian/patches/bq2415x_charger.patch | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/kernel-power-2.6.28/debian/patches/bq2415x_charger.patch b/kernel-power-2.6.28/debian/patches/bq2415x_charger.patch index 40217e2..32d8fab 100644 --- a/kernel-power-2.6.28/debian/patches/bq2415x_charger.patch +++ b/kernel-power-2.6.28/debian/patches/bq2415x_charger.patch @@ -1,6 +1,6 @@ --- /dev/null +++ kernel-power/drivers/power/bq2415x_charger.c -@@ -0,0 +1,1637 @@ +@@ -0,0 +1,1636 @@ +/* + bq2415x_charger.c - bq2415x charger driver + Copyright (C) 2011-2012 Pali Rohár @@ -792,15 +792,14 @@ + if (!bq) + return; + -+ /* this should not happen, hook function is called only in automode */ ++ dev_dbg(bq->dev, "hook function was called\n"); ++ bq->reported_mode = mode; ++ ++ /* if automode is not enabled do not tell about reported_mode */ + if (bq->automode < 1) + return; + -+ dev_dbg(bq->dev, "hook function was called\n"); -+ -+ bq->reported_mode = mode; + sysfs_notify(&bq->charger.dev->kobj, NULL, "reported_mode"); -+ + bq2415x_set_mode(bq, bq->reported_mode); + +} -- 1.7.9.5