mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 10:49:33 +00:00
Char/misc fix for 4.1-rc4
Here is one fix, in the extcon subsystem, that resolves a reported issue. It's been in linux-next for a number of weeks now, sorry for not getting it to you sooner. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEABECAAYFAlVX4VEACgkQMUfUDdst+yk3sQCgtlRpHuuO0p7VAKHakWixhK7i 7D0An16DODuDxlf00fIZDkGr8lcZ+pXb =GiRC -----END PGP SIGNATURE----- Merge tag 'char-misc-4.1-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc fix from Greg KH: "Here is one fix, in the extcon subsystem, that resolves a reported issue. It's been in linux-next for a number of weeks now, sorry for not getting it to you sooner" * tag 'char-misc-4.1-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: extcon: usb-gpio: register extcon device before IRQ registration
This commit is contained in:
commit
148c46f3e1
1 changed files with 12 additions and 12 deletions
|
@ -119,6 +119,18 @@ static int usb_extcon_probe(struct platform_device *pdev)
|
|||
return PTR_ERR(info->id_gpiod);
|
||||
}
|
||||
|
||||
info->edev = devm_extcon_dev_allocate(dev, usb_extcon_cable);
|
||||
if (IS_ERR(info->edev)) {
|
||||
dev_err(dev, "failed to allocate extcon device\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
ret = devm_extcon_dev_register(dev, info->edev);
|
||||
if (ret < 0) {
|
||||
dev_err(dev, "failed to register extcon device\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = gpiod_set_debounce(info->id_gpiod,
|
||||
USB_GPIO_DEBOUNCE_MS * 1000);
|
||||
if (ret < 0)
|
||||
|
@ -142,18 +154,6 @@ static int usb_extcon_probe(struct platform_device *pdev)
|
|||
return ret;
|
||||
}
|
||||
|
||||
info->edev = devm_extcon_dev_allocate(dev, usb_extcon_cable);
|
||||
if (IS_ERR(info->edev)) {
|
||||
dev_err(dev, "failed to allocate extcon device\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
ret = devm_extcon_dev_register(dev, info->edev);
|
||||
if (ret < 0) {
|
||||
dev_err(dev, "failed to register extcon device\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
platform_set_drvdata(pdev, info);
|
||||
device_init_wakeup(dev, 1);
|
||||
|
||||
|
|
Loading…
Reference in a new issue