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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1338747893-29338-1-git-send-email-stigge@antcom.de>
Date:	Sun,  3 Jun 2012 20:24:52 +0200
From:	Roland Stigge <stigge@...com.de>
To:	stern@...land.harvard.edu, gregkh@...uxfoundation.org,
	grant.likely@...retlab.ca, rob.herring@...xeda.com,
	linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org, kevin.wells@....com,
	srinivas.bakki@....com
Cc:	Roland Stigge <stigge@...com.de>
Subject: [PATCH] ohci-nxp: Use ohci_finish_controller_resume()

OHCI drivers are supposed to use ohci_finish_controller_resume(). This patch
adds respective suspend and resume code to ohci-nxp. The following compiler
warning is fixed this way:

drivers/usb/host/ohci-hub.c:321: warning: 'ohci_finish_controller_resume'
defined but not used

Signed-off-by: Roland Stigge <stigge@...com.de>

---
Applies to v3.5-rc1

 drivers/usb/host/ohci-nxp.c |   21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

--- linux-2.6.orig/drivers/usb/host/ohci-nxp.c
+++ linux-2.6/drivers/usb/host/ohci-nxp.c
@@ -432,6 +432,23 @@ static int usb_hcd_nxp_remove(struct pla
 	return 0;
 }
 
+#ifdef CONFIG_PM
+static int usb_hcd_suspend(struct platform_device *pdev, pm_message_t message)
+{
+	clk_disable(usb_clk);
+	return 0;
+}
+
+static int usb_hcd_resume(struct platform_device *pdev)
+{
+	struct usb_hcd *hcd = platform_get_drvdata(pdev);
+
+	clk_enable(usb_clk);
+	ohci_finish_controller_resume(hcd);
+	return 0;
+}
+#endif
+
 /* work with hotplug and coldplug */
 MODULE_ALIAS("platform:usb-ohci");
 
@@ -451,5 +468,9 @@ static struct platform_driver usb_hcd_nx
 	},
 	.probe = usb_hcd_nxp_probe,
 	.remove = usb_hcd_nxp_remove,
+#ifdef CONFIG_PM
+	.suspend = usb_hcd_suspend,
+	.resume = usb_hcd_resume,
+#endif
 };
 
--
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