* [PATCH 1/3] USB: EHCI: Fix compiler warnings with MSM driver
@ 2011-02-15 4:12 Pavankumar Kondeti
2011-02-15 4:12 ` [PATCH 2/3] USB: OTG: msm: Fix compiler warning with CONFIG_PM disabled Pavankumar Kondeti
[not found] ` <1297743155-2409-1-git-send-email-pkondeti-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
0 siblings, 2 replies; 5+ messages in thread
From: Pavankumar Kondeti @ 2011-02-15 4:12 UTC (permalink / raw)
To: greg, linux-usb; +Cc: linux-arm-msm, Pavankumar Kondeti
This patch fixes the following compile warnings
drivers/usb/host/ehci-dbg.c:45: warning: 'dbg_hcs_params' defined but not used
drivers/usb/host/ehci-dbg.c:89: warning: 'dbg_hcc_params' defined but not used
drivers/usb/host/ehci-lpm.c:21: warning: 'ehci_lpm_set_da' defined but not used
drivers/usb/host/ehci-lpm.c:41: warning: 'ehci_lpm_check' defined but not used
drivers/usb/host/ehci-hcd.c:668: warning: 'ehci_run' defined but not used
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
---
drivers/usb/host/ehci-hcd.c | 2 +-
drivers/usb/host/ehci-lpm.c | 5 +++--
drivers/usb/host/ehci-msm.c | 4 +++-
3 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index 74dcf49..94dd11b 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -669,7 +669,7 @@ static int ehci_init(struct usb_hcd *hcd)
}
/* start HC running; it's halted, ehci_init() has been run (once) */
-static int ehci_run (struct usb_hcd *hcd)
+static int __maybe_unused ehci_run(struct usb_hcd *hcd)
{
struct ehci_hcd *ehci = hcd_to_ehci (hcd);
int retval;
diff --git a/drivers/usb/host/ehci-lpm.c b/drivers/usb/host/ehci-lpm.c
index b4d4d63..305e549 100644
--- a/drivers/usb/host/ehci-lpm.c
+++ b/drivers/usb/host/ehci-lpm.c
@@ -17,7 +17,8 @@
*/
/* this file is part of ehci-hcd.c */
-static int ehci_lpm_set_da(struct ehci_hcd *ehci, int dev_addr, int port_num)
+static int __maybe_unused
+ehci_lpm_set_da(struct ehci_hcd *ehci, int dev_addr, int port_num)
{
u32 __iomem portsc;
@@ -37,7 +38,7 @@ static int ehci_lpm_set_da(struct ehci_hcd *ehci, int dev_addr, int port_num)
* this function is used to check if the device support LPM
* if yes, mark the PORTSC register with PORT_LPM bit
*/
-static int ehci_lpm_check(struct ehci_hcd *ehci, int port)
+static int __maybe_unused ehci_lpm_check(struct ehci_hcd *ehci, int port)
{
u32 __iomem *portsc ;
u32 val32;
diff --git a/drivers/usb/host/ehci-msm.c b/drivers/usb/host/ehci-msm.c
index 413f4de..d62075b 100644
--- a/drivers/usb/host/ehci-msm.c
+++ b/drivers/usb/host/ehci-msm.c
@@ -1,6 +1,6 @@
/* ehci-msm.c - HSUSB Host Controller Driver Implementation
*
- * Copyright (c) 2008-2010, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2008-2011, Code Aurora Forum. All rights reserved.
*
* Partly derived from ehci-fsl.c and ehci-hcd.c
* Copyright (c) 2000-2004 by David Brownell
@@ -128,6 +128,8 @@ static int ehci_msm_reset(struct usb_hcd *hcd)
ehci->caps = USB_CAPLENGTH;
ehci->regs = USB_CAPLENGTH +
HC_LENGTH(ehci_readl(ehci, &ehci->caps->hc_capbase));
+ dbg_hcs_params(ehci, "reset");
+ dbg_hcc_params(ehci, "reset");
/* cache the data to minimize the chip reads*/
ehci->hcs_params = ehci_readl(ehci, &ehci->caps->hcs_params);
--
1.7.1
--
Sent by a consultant of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/3] USB: OTG: msm: Fix compiler warning with CONFIG_PM disabled
2011-02-15 4:12 [PATCH 1/3] USB: EHCI: Fix compiler warnings with MSM driver Pavankumar Kondeti
@ 2011-02-15 4:12 ` Pavankumar Kondeti
[not found] ` <1297743155-2409-1-git-send-email-pkondeti-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
1 sibling, 0 replies; 5+ messages in thread
From: Pavankumar Kondeti @ 2011-02-15 4:12 UTC (permalink / raw)
To: greg, linux-usb; +Cc: linux-arm-msm, Pavankumar Kondeti
This patch fixes the below compiler warning
drivers/usb/otg/msm72k_otg.c:257: warning: 'msm_otg_suspend' defined but not used
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
---
drivers/usb/otg/msm72k_otg.c | 28 +++++++++++++---------------
1 files changed, 13 insertions(+), 15 deletions(-)
diff --git a/drivers/usb/otg/msm72k_otg.c b/drivers/usb/otg/msm72k_otg.c
index 1cd52ed..4d79017 100644
--- a/drivers/usb/otg/msm72k_otg.c
+++ b/drivers/usb/otg/msm72k_otg.c
@@ -253,6 +253,9 @@ static int msm_otg_reset(struct otg_transceiver *otg)
}
#define PHY_SUSPEND_TIMEOUT_USEC (500 * 1000)
+#define PHY_RESUME_TIMEOUT_USEC (100 * 1000)
+
+#ifdef CONFIG_PM_SLEEP
static int msm_otg_suspend(struct msm_otg *motg)
{
struct otg_transceiver *otg = &motg->otg;
@@ -334,7 +337,6 @@ static int msm_otg_suspend(struct msm_otg *motg)
return 0;
}
-#define PHY_RESUME_TIMEOUT_USEC (100 * 1000)
static int msm_otg_resume(struct msm_otg *motg)
{
struct otg_transceiver *otg = &motg->otg;
@@ -399,6 +401,7 @@ skip_phy_resume:
return 0;
}
+#endif
static void msm_otg_start_host(struct otg_transceiver *otg, int on)
{
@@ -972,7 +975,7 @@ static int __devexit msm_otg_remove(struct platform_device *pdev)
msm_otg_debugfs_cleanup();
cancel_work_sync(&motg->sm_work);
- msm_otg_resume(motg);
+ pm_runtime_resume(&pdev->dev);
device_init_wakeup(&pdev->dev, 0);
pm_runtime_disable(&pdev->dev);
@@ -1050,13 +1053,9 @@ static int msm_otg_runtime_resume(struct device *dev)
dev_dbg(dev, "OTG runtime resume\n");
return msm_otg_resume(motg);
}
-#else
-#define msm_otg_runtime_idle NULL
-#define msm_otg_runtime_suspend NULL
-#define msm_otg_runtime_resume NULL
#endif
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
static int msm_otg_pm_suspend(struct device *dev)
{
struct msm_otg *motg = dev_get_drvdata(dev);
@@ -1086,25 +1085,24 @@ static int msm_otg_pm_resume(struct device *dev)
return 0;
}
-#else
-#define msm_otg_pm_suspend NULL
-#define msm_otg_pm_resume NULL
#endif
+#ifdef CONFIG_PM
static const struct dev_pm_ops msm_otg_dev_pm_ops = {
- .runtime_suspend = msm_otg_runtime_suspend,
- .runtime_resume = msm_otg_runtime_resume,
- .runtime_idle = msm_otg_runtime_idle,
- .suspend = msm_otg_pm_suspend,
- .resume = msm_otg_pm_resume,
+ SET_SYSTEM_SLEEP_PM_OPS(msm_otg_pm_suspend, msm_otg_pm_resume)
+ SET_RUNTIME_PM_OPS(msm_otg_runtime_suspend, msm_otg_runtime_resume,
+ msm_otg_runtime_idle)
};
+#endif
static struct platform_driver msm_otg_driver = {
.remove = __devexit_p(msm_otg_remove),
.driver = {
.name = DRIVER_NAME,
.owner = THIS_MODULE,
+#ifdef CONFIG_PM
.pm = &msm_otg_dev_pm_ops,
+#endif
},
};
--
1.7.1
--
Sent by a consultant of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 3/3] USB: OTG: msm: Fix bug in msm_otg_mode_write
[not found] ` <1297743155-2409-1-git-send-email-pkondeti-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
@ 2011-02-15 4:12 ` Pavankumar Kondeti
2011-02-17 18:55 ` [PATCH 1/3] USB: EHCI: Fix compiler warnings with MSM driver Greg KH
1 sibling, 0 replies; 5+ messages in thread
From: Pavankumar Kondeti @ 2011-02-15 4:12 UTC (permalink / raw)
To: greg-U8xfFu+wG4EAvxtiuMwx3w, linux-usb-u79uwXL29TY76Z2rM5mHXA
Cc: linux-arm-msm-u79uwXL29TY76Z2rM5mHXA, Pavankumar Kondeti
The driver private data is retrieved incorrectly which results
a crash when written into "mode" debugfs file.
Signed-off-by: Pavankumar Kondeti <pkondeti-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
---
drivers/usb/otg/msm72k_otg.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/usb/otg/msm72k_otg.c b/drivers/usb/otg/msm72k_otg.c
index 4d79017..2965986 100644
--- a/drivers/usb/otg/msm72k_otg.c
+++ b/drivers/usb/otg/msm72k_otg.c
@@ -723,7 +723,8 @@ static int msm_otg_mode_open(struct inode *inode, struct file *file)
static ssize_t msm_otg_mode_write(struct file *file, const char __user *ubuf,
size_t count, loff_t *ppos)
{
- struct msm_otg *motg = file->private_data;
+ struct seq_file *s = file->private_data;
+ struct msm_otg *motg = s->private;
char buf[16];
struct otg_transceiver *otg = &motg->otg;
int status = count;
--
1.7.1
--
Sent by a consultant of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/3] USB: EHCI: Fix compiler warnings with MSM driver
[not found] ` <1297743155-2409-1-git-send-email-pkondeti-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2011-02-15 4:12 ` [PATCH 3/3] USB: OTG: msm: Fix bug in msm_otg_mode_write Pavankumar Kondeti
@ 2011-02-17 18:55 ` Greg KH
2011-02-18 11:58 ` Pavan Kondeti
1 sibling, 1 reply; 5+ messages in thread
From: Greg KH @ 2011-02-17 18:55 UTC (permalink / raw)
To: Pavankumar Kondeti
Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA,
linux-arm-msm-u79uwXL29TY76Z2rM5mHXA
On Tue, Feb 15, 2011 at 09:42:33AM +0530, Pavankumar Kondeti wrote:
> This patch fixes the following compile warnings
>
> drivers/usb/host/ehci-dbg.c:45: warning: 'dbg_hcs_params' defined but not used
> drivers/usb/host/ehci-dbg.c:89: warning: 'dbg_hcc_params' defined but not used
> drivers/usb/host/ehci-lpm.c:21: warning: 'ehci_lpm_set_da' defined but not used
> drivers/usb/host/ehci-lpm.c:41: warning: 'ehci_lpm_check' defined but not used
> drivers/usb/host/ehci-hcd.c:668: warning: 'ehci_run' defined but not used
>
> Signed-off-by: Pavankumar Kondeti <pkondeti-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
> ---
> drivers/usb/host/ehci-hcd.c | 2 +-
> drivers/usb/host/ehci-lpm.c | 5 +++--
> drivers/usb/host/ehci-msm.c | 4 +++-
This doesn't apply to the usb-next tree, so I can't take it :(
Care to refresh it and resend?
thanks,
greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/3] USB: EHCI: Fix compiler warnings with MSM driver
2011-02-17 18:55 ` [PATCH 1/3] USB: EHCI: Fix compiler warnings with MSM driver Greg KH
@ 2011-02-18 11:58 ` Pavan Kondeti
0 siblings, 0 replies; 5+ messages in thread
From: Pavan Kondeti @ 2011-02-18 11:58 UTC (permalink / raw)
To: Greg KH; +Cc: linux-usb, linux-arm-msm
On 2/18/2011 12:25 AM, Greg KH wrote:
> On Tue, Feb 15, 2011 at 09:42:33AM +0530, Pavankumar Kondeti wrote:
>> This patch fixes the following compile warnings
>>
>> drivers/usb/host/ehci-dbg.c:45: warning: 'dbg_hcs_params' defined but not used
>> drivers/usb/host/ehci-dbg.c:89: warning: 'dbg_hcc_params' defined but not used
>> drivers/usb/host/ehci-lpm.c:21: warning: 'ehci_lpm_set_da' defined but not used
>> drivers/usb/host/ehci-lpm.c:41: warning: 'ehci_lpm_check' defined but not used
>> drivers/usb/host/ehci-hcd.c:668: warning: 'ehci_run' defined but not used
>>
>> Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
>> ---
>> drivers/usb/host/ehci-hcd.c | 2 +-
>> drivers/usb/host/ehci-lpm.c | 5 +++--
>> drivers/usb/host/ehci-msm.c | 4 +++-
>
> This doesn't apply to the usb-next tree, so I can't take it :(
>
> Care to refresh it and resend?
>
Sorry for the inconvenience. The last 3 warnings or no more with
usb-next branch. I am resending the patch shortly.
Thanks,
Pavan
--
Sent by a consultant of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-02-18 11:58 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-15 4:12 [PATCH 1/3] USB: EHCI: Fix compiler warnings with MSM driver Pavankumar Kondeti
2011-02-15 4:12 ` [PATCH 2/3] USB: OTG: msm: Fix compiler warning with CONFIG_PM disabled Pavankumar Kondeti
[not found] ` <1297743155-2409-1-git-send-email-pkondeti-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2011-02-15 4:12 ` [PATCH 3/3] USB: OTG: msm: Fix bug in msm_otg_mode_write Pavankumar Kondeti
2011-02-17 18:55 ` [PATCH 1/3] USB: EHCI: Fix compiler warnings with MSM driver Greg KH
2011-02-18 11:58 ` Pavan Kondeti
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).