extcon-fixed-usb: Add release() callback 98/315898/1
authorSeung-Woo Kim <sw0312.kim@samsung.com>
Fri, 6 Dec 2024 02:19:18 +0000 (11:19 +0900)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Fri, 6 Dec 2024 02:19:21 +0000 (11:19 +0900)
Without release callback of struct device, it gives below
warning when unload module.

   Device 'extcon_usb_fixed.0' does not have a release() function, it is broken and must be fixed. See Documentation/core-api/kobject.rst.
   WARNING: CPU: 2 PID: 1385 at drivers/base/core.c:2508 device_release+0x88/0xa0

Change-Id: If34a757ca420c14a410731ca0cf45986ddfd5193
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
kernel/extcon-usb-fixed.c

index a50f6c04ce75ac3935ded1cbe0ea0a2e1c27dd07..252fdbfaedc10fd0fdc114f03257f445f1946536 100644 (file)
@@ -24,8 +24,11 @@ static const unsigned int supported_cable[] = {
        EXTCON_NONE,
 };
 
+static void extcon_usb_fixed_dev_release(struct device *dev) {}
+
 static struct platform_device extcon_usb_fixed_dev = {
         .name              = "extcon_usb_fixed",
+        .dev.release       = extcon_usb_fixed_dev_release,
 };
 
 static int fixed_usb_extcon_init(void)