aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2013-03-31 21:34:43 -0400
committerFelipe Balbi <balbi@ti.com>2013-04-02 04:42:48 -0400
commit225da3e3cb1f0db9e4cb7fa2a7dc3a360d1cf788 (patch)
treed025de4153ffad269d29fe9bb806c0faa8b16272 /arch
parentef096542642874de10909f02686447a96a66ad14 (diff)
usb: renesas_usbhs: fixup sparse errors for common.c
This patch fixup below sparse errors CHECK ${RENESAS_USB}/common.c ${RENESAS_USB}/common.c:313:17: error: incompatible types in conditional expression (different base types) ${RENESAS_USB}/common.c:322:17: error: incompatible types in conditional expression (different base types) ${RENESAS_USB}/common.c:384:17: error: incompatible types in conditional expression (different base types) ${RENESAS_USB}/common.c:524:9: error: incompatible types in conditional expression (different base types) ${RENESAS_USB}/common.c:545:9: error: incompatible types in conditional expression (different base types) ${RENESAS_USB}/common.c:574:9: error: incompatible types in conditional expression (different base types) ${RENESAS_USB}/common.c:606:9: error: incompatible types in conditional expression (different base types) ${RENESAS_USB}/mod_gadget.c:233:28: warning: symbol 'req_clear_feature' was not declared. Should it be static? ${RENESAS_USB}/mod_gadget.c:274:28: warning: symbol 'req_set_feature' was not declared. Should it be static? ${RENESAS_USB}/mod_gadget.c:375:28: warning: symbol 'req_get_status' was not declared. Should it be static? [ balbi@ti.com : added three sparse fixes to mod_gadget.c ] Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-shmobile/board-armadillo800eva.c8
-rw-r--r--arch/arm/mach-shmobile/board-kzm9g.c8
-rw-r--r--arch/arm/mach-shmobile/board-mackerel.c12
-rw-r--r--arch/sh/boards/mach-ecovec24/setup.c4
4 files changed, 24 insertions, 8 deletions
diff --git a/arch/arm/mach-shmobile/board-armadillo800eva.c b/arch/arm/mach-shmobile/board-armadillo800eva.c
index f2ec0777cfbe..ff8b7ba9b93c 100644
--- a/arch/arm/mach-shmobile/board-armadillo800eva.c
+++ b/arch/arm/mach-shmobile/board-armadillo800eva.c
@@ -169,7 +169,7 @@ static int usbhsf_get_id(struct platform_device *pdev)
169 return USBHS_GADGET; 169 return USBHS_GADGET;
170} 170}
171 171
172static void usbhsf_power_ctrl(struct platform_device *pdev, 172static int usbhsf_power_ctrl(struct platform_device *pdev,
173 void __iomem *base, int enable) 173 void __iomem *base, int enable)
174{ 174{
175 struct usbhsf_private *priv = usbhsf_get_priv(pdev); 175 struct usbhsf_private *priv = usbhsf_get_priv(pdev);
@@ -223,6 +223,8 @@ static void usbhsf_power_ctrl(struct platform_device *pdev,
223 clk_disable(priv->pci); /* usb work around */ 223 clk_disable(priv->pci); /* usb work around */
224 clk_disable(priv->usb24); /* usb work around */ 224 clk_disable(priv->usb24); /* usb work around */
225 } 225 }
226
227 return 0;
226} 228}
227 229
228static int usbhsf_get_vbus(struct platform_device *pdev) 230static int usbhsf_get_vbus(struct platform_device *pdev)
@@ -239,7 +241,7 @@ static irqreturn_t usbhsf_interrupt(int irq, void *data)
239 return IRQ_HANDLED; 241 return IRQ_HANDLED;
240} 242}
241 243
242static void usbhsf_hardware_exit(struct platform_device *pdev) 244static int usbhsf_hardware_exit(struct platform_device *pdev)
243{ 245{
244 struct usbhsf_private *priv = usbhsf_get_priv(pdev); 246 struct usbhsf_private *priv = usbhsf_get_priv(pdev);
245 247
@@ -264,6 +266,8 @@ static void usbhsf_hardware_exit(struct platform_device *pdev)
264 priv->usbh_base = NULL; 266 priv->usbh_base = NULL;
265 267
266 free_irq(IRQ7, pdev); 268 free_irq(IRQ7, pdev);
269
270 return 0;
267} 271}
268 272
269static int usbhsf_hardware_init(struct platform_device *pdev) 273static int usbhsf_hardware_init(struct platform_device *pdev)
diff --git a/arch/arm/mach-shmobile/board-kzm9g.c b/arch/arm/mach-shmobile/board-kzm9g.c
index 7f3a6b7e7b7c..a385f570bbfc 100644
--- a/arch/arm/mach-shmobile/board-kzm9g.c
+++ b/arch/arm/mach-shmobile/board-kzm9g.c
@@ -155,12 +155,14 @@ static int usbhs_get_vbus(struct platform_device *pdev)
155 return !((1 << 7) & __raw_readw(priv->cr2)); 155 return !((1 << 7) & __raw_readw(priv->cr2));
156} 156}
157 157
158static void usbhs_phy_reset(struct platform_device *pdev) 158static int usbhs_phy_reset(struct platform_device *pdev)
159{ 159{
160 struct usbhs_private *priv = usbhs_get_priv(pdev); 160 struct usbhs_private *priv = usbhs_get_priv(pdev);
161 161
162 /* init phy */ 162 /* init phy */
163 __raw_writew(0x8a0a, priv->cr2); 163 __raw_writew(0x8a0a, priv->cr2);
164
165 return 0;
164} 166}
165 167
166static int usbhs_get_id(struct platform_device *pdev) 168static int usbhs_get_id(struct platform_device *pdev)
@@ -202,7 +204,7 @@ static int usbhs_hardware_init(struct platform_device *pdev)
202 return 0; 204 return 0;
203} 205}
204 206
205static void usbhs_hardware_exit(struct platform_device *pdev) 207static int usbhs_hardware_exit(struct platform_device *pdev)
206{ 208{
207 struct usbhs_private *priv = usbhs_get_priv(pdev); 209 struct usbhs_private *priv = usbhs_get_priv(pdev);
208 210
@@ -210,6 +212,8 @@ static void usbhs_hardware_exit(struct platform_device *pdev)
210 __raw_writew(USB_PHY_MODE | USB_PHY_INT_CLR, priv->phy); 212 __raw_writew(USB_PHY_MODE | USB_PHY_INT_CLR, priv->phy);
211 213
212 free_irq(IRQ15, pdev); 214 free_irq(IRQ15, pdev);
215
216 return 0;
213} 217}
214 218
215static u32 usbhs_pipe_cfg[] = { 219static u32 usbhs_pipe_cfg[] = {
diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c
index db968a585ff0..979237c18dad 100644
--- a/arch/arm/mach-shmobile/board-mackerel.c
+++ b/arch/arm/mach-shmobile/board-mackerel.c
@@ -596,12 +596,14 @@ static int usbhs_get_vbus(struct platform_device *pdev)
596 return usbhs_is_connected(usbhs_get_priv(pdev)); 596 return usbhs_is_connected(usbhs_get_priv(pdev));
597} 597}
598 598
599static void usbhs_phy_reset(struct platform_device *pdev) 599static int usbhs_phy_reset(struct platform_device *pdev)
600{ 600{
601 struct usbhs_private *priv = usbhs_get_priv(pdev); 601 struct usbhs_private *priv = usbhs_get_priv(pdev);
602 602
603 /* init phy */ 603 /* init phy */
604 __raw_writew(0x8a0a, priv->usbcrcaddr); 604 __raw_writew(0x8a0a, priv->usbcrcaddr);
605
606 return 0;
605} 607}
606 608
607static int usbhs0_get_id(struct platform_device *pdev) 609static int usbhs0_get_id(struct platform_device *pdev)
@@ -628,11 +630,13 @@ static int usbhs0_hardware_init(struct platform_device *pdev)
628 return 0; 630 return 0;
629} 631}
630 632
631static void usbhs0_hardware_exit(struct platform_device *pdev) 633static int usbhs0_hardware_exit(struct platform_device *pdev)
632{ 634{
633 struct usbhs_private *priv = usbhs_get_priv(pdev); 635 struct usbhs_private *priv = usbhs_get_priv(pdev);
634 636
635 cancel_delayed_work_sync(&priv->work); 637 cancel_delayed_work_sync(&priv->work);
638
639 return 0;
636} 640}
637 641
638static struct usbhs_private usbhs0_private = { 642static struct usbhs_private usbhs0_private = {
@@ -735,7 +739,7 @@ static int usbhs1_hardware_init(struct platform_device *pdev)
735 return 0; 739 return 0;
736} 740}
737 741
738static void usbhs1_hardware_exit(struct platform_device *pdev) 742static int usbhs1_hardware_exit(struct platform_device *pdev)
739{ 743{
740 struct usbhs_private *priv = usbhs_get_priv(pdev); 744 struct usbhs_private *priv = usbhs_get_priv(pdev);
741 745
@@ -743,6 +747,8 @@ static void usbhs1_hardware_exit(struct platform_device *pdev)
743 __raw_writew(USB_PHY_MODE | USB_PHY_INT_CLR, priv->usbphyaddr); 747 __raw_writew(USB_PHY_MODE | USB_PHY_INT_CLR, priv->usbphyaddr);
744 748
745 free_irq(IRQ8, pdev); 749 free_irq(IRQ8, pdev);
750
751 return 0;
746} 752}
747 753
748static int usbhs1_get_id(struct platform_device *pdev) 754static int usbhs1_get_id(struct platform_device *pdev)
diff --git a/arch/sh/boards/mach-ecovec24/setup.c b/arch/sh/boards/mach-ecovec24/setup.c
index aaff7671101b..764530c85aa9 100644
--- a/arch/sh/boards/mach-ecovec24/setup.c
+++ b/arch/sh/boards/mach-ecovec24/setup.c
@@ -254,11 +254,13 @@ static int usbhs_get_id(struct platform_device *pdev)
254 return gpio_get_value(GPIO_PTB3); 254 return gpio_get_value(GPIO_PTB3);
255} 255}
256 256
257static void usbhs_phy_reset(struct platform_device *pdev) 257static int usbhs_phy_reset(struct platform_device *pdev)
258{ 258{
259 /* enable vbus if HOST */ 259 /* enable vbus if HOST */
260 if (!gpio_get_value(GPIO_PTB3)) 260 if (!gpio_get_value(GPIO_PTB3))
261 gpio_set_value(GPIO_PTB5, 1); 261 gpio_set_value(GPIO_PTB5, 1);
262
263 return 0;
262} 264}
263 265
264static struct renesas_usbhs_platform_info usbhs_info = { 266static struct renesas_usbhs_platform_info usbhs_info = {