Return-path: Received: from mail-bw0-f46.google.com ([209.85.214.46]:41602 "EHLO mail-bw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752292Ab0HVUlk (ORCPT ); Sun, 22 Aug 2010 16:41:40 -0400 Received: by bwz11 with SMTP id 11so3403374bwz.19 for ; Sun, 22 Aug 2010 13:41:39 -0700 (PDT) From: Christian Lamparter To: "linux-wireless" Subject: [PATCH] p54usb: fix off-by-one on !CONFIG_PM Date: Sun, 22 Aug 2010 22:41:33 +0200 Cc: "John W. Linville" MIME-Version: 1.0 Content-Type: Text/Plain; charset="us-ascii" Message-Id: <201008222241.33364.chunkeey@googlemail.com> Sender: linux-wireless-owner@vger.kernel.org List-ID: 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. Cc: Signed-off-by: Christian Lamparter --- diff --git a/drivers/net/wireless/p54/p54usb.c b/drivers/net/wireless/p54/p54usb.c index ad59595..063248b 100644 --- a/drivers/net/wireless/p54/p54usb.c +++ b/drivers/net/wireless/p54/p54usb.c @@ -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);