Skip to contentSkip to conversation

p54usb: fix off-by-one on !CONFIG_PM

PATCH In review Christian Lamparter 2 participants 2 messages Aug 22, 2010 Networking drivers (wireless)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 p54usb: fix off-by-one on !CONFIG_PM

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.

---

drivers/net/wireless/p54/p54usb.c +1 -1
index ad59595..063248b 100644
@@ -930,8 +930,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);
#1 lore raw
Quoted 16 lines · Christian Lamparter

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.

---

drivers/net/wireless/p54/p54usb.c +0 -0
index ad59595..063248b 100644

drivers/net/wireless/p54/p54usb.c static int __devinit p54u_probe(struct usb_interface *intf, · line 937

Quoted 9 lines
drivers/net/wireless/p54/p54usb.c +1 -1
@@ -930,8 +930,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);

ACK.

Larry