battery: remove unnecessary probe for power-supply 69/276769/1
authorYoungjae Cho <y0.cho@samsung.com>
Fri, 24 Jun 2022 07:54:05 +0000 (16:54 +0900)
committerYoungjae Cho <y0.cho@samsung.com>
Fri, 24 Jun 2022 07:54:05 +0000 (16:54 +0900)
It is naturally done by the power-supply module itself. Therefore it
is unnecessary for lowbat module to probe power-supply.

Change-Id: Id18bcea6a1bd9a0aae87c5f6a54815dc74b814b6
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
src/battery/lowbat-handler.c

index adc3513..050defe 100644 (file)
@@ -698,19 +698,6 @@ static const dbus_interface_u dbus_interface = {
        .nr_methods = ARRAY_SIZE(dbus_methods),
 };
 
-static int lowbat_probe(void *data)
-{
-       static const struct device_ops *ops;
-       int ret = -EINVAL;
-
-       FIND_DEVICE_INT(ops, "power_supply");
-       ret = ops->probe(data);
-       if (ret == 0)
-               _I("Support lowbat handler.");
-
-       return ret;
-}
-
 static void lowbat_init(void *data)
 {
        int ret;
@@ -784,7 +771,6 @@ void lowbat_disable_uevent_buffering(void)
 
 static const struct device_ops lowbat_device_ops = {
        DECLARE_NAME_LEN("lowbat"),
-       .probe    = lowbat_probe,
        .init     = lowbat_init,
        .execute  = lowbat_execute,
        .exit     = lowbat_exit,