lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200807011910.09251.oliver@neukum.org>
Date:	Tue, 1 Jul 2008 19:10:08 +0200
From:	Oliver Neukum <oliver@...kum.org>
To:	Greg KH <greg@...ah.com>
Cc:	Randy Dunlap <randy.dunlap@...cle.com>,
	Alan Stern <stern@...land.harvard.edu>,
	Stephen Rothwell <sfr@...b.auug.org.au>,
	linux-next@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>
Subject: Re: linux-next: Tree for June 30 (USB: cdc-acm)

Am Montag 30 Juni 2008 21:01:25 schrieb Greg KH:
> On Mon, Jun 30, 2008 at 11:43:32AM -0700, Randy Dunlap wrote:
> > cdc-acm fails to build when CONFIG_PM=n:
> > 
> > linux-next-20080630/drivers/usb/class/cdc-acm.c: In function 'acm_suspend':
> > linux-next-20080630/drivers/usb/class/cdc-acm.c:1263: error: 'struct usb_device' has no member named 'auto_pm'
> > make[4]: *** [drivers/usb/class/cdc-acm.o] Error 1
> 
> Yeah, known issue due to the pm and usb trees conflicting here.  It will
> be fixed up at the merge time with Linus.

Here's the fix. cdc-wdm has the same problem. The fix is the same.

	Regards
		Oliver

Signed-off-by: Oliver Neukum <oneukum@...e.de>

---

--- linux-2.6.26-greg/drivers/usb/class/cdc-acm.alt.c	2008-07-01 11:22:06.000000000 +0200
+++ linux-2.6.26-greg/drivers/usb/class/cdc-acm.c	2008-07-01 11:24:24.000000000 +0200
@@ -1258,6 +1258,7 @@ static void acm_disconnect(struct usb_in
 		tty_hangup(acm->tty);
 }
 
+#ifdef CONFIG_PM
 static int acm_suspend(struct usb_interface *intf, pm_message_t message)
 {
 	struct acm *acm = usb_get_intfdata(intf);
@@ -1323,6 +1324,8 @@ err_out:
 	mutex_unlock(&acm->mutex);
 	return rv;
 }
+
+#endif /* CONFIG_PM */
 /*
  * USB driver structure.
  */
@@ -1378,10 +1381,14 @@ static struct usb_driver acm_driver = {
 	.name =		"cdc_acm",
 	.probe =	acm_probe,
 	.disconnect =	acm_disconnect,
+#ifdef CONFIG_PM
 	.suspend =	acm_suspend,
 	.resume =	acm_resume,
+#endif
 	.id_table =	acm_ids,
+#ifdef CONFIG_PM
 	.supports_autosuspend = 1,
+#endif
 };
 
 /*
--- linux-2.6.26-greg/drivers/usb/class/cdc-wdm.alt.c	2008-07-01 11:36:03.000000000 +0200
+++ linux-2.6.26-greg/drivers/usb/class/cdc-wdm.c	2008-07-01 11:36:35.000000000 +0200
@@ -750,12 +750,16 @@ static int wdm_suspend(struct usb_interf
 	dev_dbg(&desc->intf->dev, "wdm%d_suspend\n", intf->minor);
 
 	mutex_lock(&desc->plock);
+#ifdef CONFIG_PM
 	if (interface_to_usbdev(desc->intf)->auto_pm && test_bit(WDM_IN_USE, &desc->flags)) {
 		rv = -EBUSY;
 	} else {
+#endif
 		cancel_work_sync(&desc->rxwork);
 		kill_urbs(desc);
+#ifdef CONFIG_PM
 	}
+#endif
 	mutex_unlock(&desc->plock);
 
 	return rv;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ