platform/x86: x86-android-tablets: Use platform-device as gpio-keys parent
authorHans de Goede <hdegoede@redhat.com>
Sat, 9 Sep 2023 14:18:15 +0000 (16:18 +0200)
committerHans de Goede <hdegoede@redhat.com>
Mon, 11 Sep 2023 11:28:58 +0000 (13:28 +0200)
Use the new x86-android-tablets platform-device as gpio-keys parent
to make it clear that this gpio-keys device was instantiated by
the x86-android-tablets driver.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20230909141816.58358-8-hdegoede@redhat.com
drivers/platform/x86/x86-android-tablets/core.c

index eb62db606925d4382732b9ef537c8260a364e1a2..8a1f22aaac0097dde2e7673c80ecd4d5973cf035 100644 (file)
@@ -378,7 +378,7 @@ static __init int x86_android_tablet_probe(struct platform_device *pdev)
                pdata.buttons = buttons;
                pdata.nbuttons = dev_info->gpio_button_count;
 
-               pdevs[pdev_count] = platform_device_register_data(NULL, "gpio-keys",
+               pdevs[pdev_count] = platform_device_register_data(&pdev->dev, "gpio-keys",
                                                                  PLATFORM_DEVID_AUTO,
                                                                  &pdata, sizeof(pdata));
                if (IS_ERR(pdevs[pdev_count])) {