]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
p54usb: fix off-by-one on !CONFIG_PM
authorChristian Lamparter <chunkeey@googlemail.com>
Sun, 22 Aug 2010 20:41:33 +0000 (22:41 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 21 Mar 2011 19:43:32 +0000 (12:43 -0700)
commit 11791a6f7534906b4a01ffb54ba0b02ca39398ef upstream.

The ISL3887 chip needs a USB reset, whenever the
usb-frontend module "p54usb" is reloaded.

This patch fixes an off-by-one bug, if the user
is running a kernel without the CONFIG_PM option
set and for some reason (e.g.: compat-wireless)
wants to switch between different p54usb modules.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/net/wireless/p54/p54usb.c

index 805284df3896be8fd0272646964fa52315c442d9..d6f8c3b5e7c42645a058ed4c18ddab06c8cd2350 100644 (file)
@@ -929,8 +929,8 @@ static int __devinit p54u_probe(struct usb_interface *intf,
 #ifdef CONFIG_PM
                /* ISL3887 needs a full reset on resume */
                udev->reset_resume = 1;
+#endif /* CONFIG_PM */
                err = p54u_device_reset(dev);
-#endif
 
                priv->hw_type = P54U_3887;
                dev->extra_tx_headroom += sizeof(struct lm87_tx_hdr);