Input: psmouse - use i2c_client_type to locate i2c clients
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Sat, 25 Mar 2017 17:45:13 +0000 (10:45 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Mon, 3 Apr 2017 19:03:55 +0000 (12:03 -0700)
Now that i2c_client_type structure is exported, we can use it, instead
of i2c_adapter_type, when looking for devices that are i2c clients.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/mouse/psmouse-smbus.c

index d2b1ea3..c7ac24d 100644 (file)
@@ -99,7 +99,7 @@ static int psmouse_smbus_notifier_call(struct notifier_block *nb,
                break;
 
        case BUS_NOTIFY_REMOVED_DEVICE:
-               if (dev->type != &i2c_adapter_type)
+               if (dev->type == &i2c_client_type)
                        psmouse_smbus_detach_i2c_client(to_i2c_client(dev));
                break;
        }