]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.12-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 18 Nov 2013 18:32:15 +0000 (10:32 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 18 Nov 2013 18:32:15 +0000 (10:32 -0800)
added patches:
backlight-atmel-pwm-bl-fix-deferred-probe-from-__init.patch
misc-atmel_pwm-add-deferred-probing-support.patch
usbcore-set-lpm_capable-field-for-lpm-capable-root-hubs.patch

queue-3.12/backlight-atmel-pwm-bl-fix-deferred-probe-from-__init.patch [new file with mode: 0644]
queue-3.12/misc-atmel_pwm-add-deferred-probing-support.patch [new file with mode: 0644]
queue-3.12/series
queue-3.12/usbcore-set-lpm_capable-field-for-lpm-capable-root-hubs.patch [new file with mode: 0644]

diff --git a/queue-3.12/backlight-atmel-pwm-bl-fix-deferred-probe-from-__init.patch b/queue-3.12/backlight-atmel-pwm-bl-fix-deferred-probe-from-__init.patch
new file mode 100644 (file)
index 0000000..8e30591
--- /dev/null
@@ -0,0 +1,59 @@
+From 9d3fde86b15303decea632c929fbf1f3ae4501f2 Mon Sep 17 00:00:00 2001
+From: Johan Hovold <jhovold@gmail.com>
+Date: Mon, 23 Sep 2013 16:27:32 +0200
+Subject: backlight: atmel-pwm-bl: fix deferred probe from __init
+
+From: Johan Hovold <jhovold@gmail.com>
+
+commit 9d3fde86b15303decea632c929fbf1f3ae4501f2 upstream.
+
+Move probe out of __init section and don't use platform_driver_probe
+which cannot be used with deferred probing.
+
+Since commit e9354576 ("gpiolib: Defer failed gpio requests by default")
+this driver might return -EPROBE_DEFER if a gpio_request fails.
+
+Cc: Richard Purdie <rpurdie@rpsys.net>
+Cc: Jingoo Han <jg1.han@samsung.com>
+Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
+Signed-off-by: Johan Hovold <jhovold@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/video/backlight/atmel-pwm-bl.c |    9 +++++----
+ 1 file changed, 5 insertions(+), 4 deletions(-)
+
+--- a/drivers/video/backlight/atmel-pwm-bl.c
++++ b/drivers/video/backlight/atmel-pwm-bl.c
+@@ -118,7 +118,7 @@ static const struct backlight_ops atmel_
+       .update_status  = atmel_pwm_bl_set_intensity,
+ };
+-static int __init atmel_pwm_bl_probe(struct platform_device *pdev)
++static int atmel_pwm_bl_probe(struct platform_device *pdev)
+ {
+       struct backlight_properties props;
+       const struct atmel_pwm_bl_platform_data *pdata;
+@@ -202,7 +202,7 @@ err_free_mem:
+       return retval;
+ }
+-static int __exit atmel_pwm_bl_remove(struct platform_device *pdev)
++static int atmel_pwm_bl_remove(struct platform_device *pdev)
+ {
+       struct atmel_pwm_bl *pwmbl = platform_get_drvdata(pdev);
+@@ -220,10 +220,11 @@ static struct platform_driver atmel_pwm_
+               .name = "atmel-pwm-bl",
+       },
+       /* REVISIT add suspend() and resume() */
+-      .remove = __exit_p(atmel_pwm_bl_remove),
++      .probe = atmel_pwm_bl_probe,
++      .remove = atmel_pwm_bl_remove,
+ };
+-module_platform_driver_probe(atmel_pwm_bl_driver, atmel_pwm_bl_probe);
++module_platform_driver(atmel_pwm_bl_driver);
+ MODULE_AUTHOR("Hans-Christian egtvedt <hans-christian.egtvedt@atmel.com>");
+ MODULE_DESCRIPTION("Atmel PWM backlight driver");
diff --git a/queue-3.12/misc-atmel_pwm-add-deferred-probing-support.patch b/queue-3.12/misc-atmel_pwm-add-deferred-probing-support.patch
new file mode 100644 (file)
index 0000000..f518448
--- /dev/null
@@ -0,0 +1,39 @@
+From 5c6d6fd1564138ad048564e48639f842714a90c6 Mon Sep 17 00:00:00 2001
+From: Johan Hovold <jhovold@gmail.com>
+Date: Tue, 22 Oct 2013 18:32:39 +0200
+Subject: misc: atmel_pwm: add deferred-probing support
+
+From: Johan Hovold <jhovold@gmail.com>
+
+commit 5c6d6fd1564138ad048564e48639f842714a90c6 upstream.
+
+Two drivers (atmel-pwm-bl and leds-atmel-pwm) currently depend on the
+atmel_pwm driver to have bound to any pwm-device before their devices
+are probed.
+
+Support deferred probing of such devices by making sure to return
+-EPROBE_DEFER from pwm_channel_alloc when no pwm-device has yet been
+bound.
+
+Signed-off-by: Johan Hovold <jhovold@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/misc/atmel_pwm.c |    6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+--- a/drivers/misc/atmel_pwm.c
++++ b/drivers/misc/atmel_pwm.c
+@@ -90,8 +90,10 @@ int pwm_channel_alloc(int index, struct
+       unsigned long   flags;
+       int             status = 0;
+-      /* insist on PWM init, with this signal pinned out */
+-      if (!pwm || !(pwm->mask & 1 << index))
++      if (!pwm)
++              return -EPROBE_DEFER;
++
++      if (!(pwm->mask & 1 << index))
+               return -ENODEV;
+       if (index < 0 || index >= PWM_NCHAN || !ch)
index b8c9dd282c3f84d001e3eb225fc07035f4ebe356..fe779db3855f02d97f2e5556dd4f292f6d9e78bd 100644 (file)
@@ -14,3 +14,6 @@ hyperv-fb-add-pci-stub.patch
 usb-add-new-zte-3g-dongle-s-pid-to-option.c.patch
 alsa-hda-hdmi-fix-reported-channel-map-on-common-default-layouts.patch
 tracing-fix-potential-out-of-bounds-in-trace_get_user.patch
+misc-atmel_pwm-add-deferred-probing-support.patch
+backlight-atmel-pwm-bl-fix-deferred-probe-from-__init.patch
+usbcore-set-lpm_capable-field-for-lpm-capable-root-hubs.patch
diff --git a/queue-3.12/usbcore-set-lpm_capable-field-for-lpm-capable-root-hubs.patch b/queue-3.12/usbcore-set-lpm_capable-field-for-lpm-capable-root-hubs.patch
new file mode 100644 (file)
index 0000000..ca1278b
--- /dev/null
@@ -0,0 +1,65 @@
+From 9df89d85b407690afa46ddfbccc80bec6869971d Mon Sep 17 00:00:00 2001
+From: Xenia Ragiadakou <burzalodowa@gmail.com>
+Date: Sat, 31 Aug 2013 18:09:12 +0300
+Subject: usbcore: set lpm_capable field for LPM capable root hubs
+
+From: Xenia Ragiadakou <burzalodowa@gmail.com>
+
+commit 9df89d85b407690afa46ddfbccc80bec6869971d upstream.
+
+This patch sets the lpm_capable field for root hubs with LPM capabilities.
+
+Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
+Reported-by: Martin MOKREJS <mmokrejs@gmail.com>
+Suggested-by: Alan Stern <stern@rowland.harvard.edu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/core/hcd.c |    1 +
+ drivers/usb/core/hub.c |    7 ++++++-
+ drivers/usb/core/usb.h |    1 +
+ 3 files changed, 8 insertions(+), 1 deletion(-)
+
+--- a/drivers/usb/core/hcd.c
++++ b/drivers/usb/core/hcd.c
+@@ -1033,6 +1033,7 @@ static int register_root_hub(struct usb_
+                                       dev_name(&usb_dev->dev), retval);
+                       return retval;
+               }
++              usb_dev->lpm_capable = usb_device_supports_lpm(usb_dev);
+       }
+       retval = usb_new_device (usb_dev);
+--- a/drivers/usb/core/hub.c
++++ b/drivers/usb/core/hub.c
+@@ -135,7 +135,7 @@ struct usb_hub *usb_hub_to_struct_hub(st
+       return usb_get_intfdata(hdev->actconfig->interface[0]);
+ }
+-static int usb_device_supports_lpm(struct usb_device *udev)
++int usb_device_supports_lpm(struct usb_device *udev)
+ {
+       /* USB 2.1 (and greater) devices indicate LPM support through
+        * their USB 2.0 Extended Capabilities BOS descriptor.
+@@ -156,6 +156,11 @@ static int usb_device_supports_lpm(struc
+                               "Power management will be impacted.\n");
+               return 0;
+       }
++
++      /* udev is root hub */
++      if (!udev->parent)
++              return 1;
++
+       if (udev->parent->lpm_capable)
+               return 1;
+--- a/drivers/usb/core/usb.h
++++ b/drivers/usb/core/usb.h
+@@ -35,6 +35,7 @@ extern int usb_get_device_descriptor(str
+               unsigned int size);
+ extern int usb_get_bos_descriptor(struct usb_device *dev);
+ extern void usb_release_bos_descriptor(struct usb_device *dev);
++extern int usb_device_supports_lpm(struct usb_device *udev);
+ extern char *usb_cache_string(struct usb_device *udev, int index);
+ extern int usb_set_configuration(struct usb_device *dev, int configuration);
+ extern int usb_choose_configuration(struct usb_device *udev);