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>
-static void usbhsf_power_ctrl(struct platform_device *pdev,
+static int usbhsf_power_ctrl(struct platform_device *pdev,
void __iomem *base, int enable)
{
struct usbhsf_private *priv = usbhsf_get_priv(pdev);
void __iomem *base, int enable)
{
struct usbhsf_private *priv = usbhsf_get_priv(pdev);
clk_disable(priv->pci); /* usb work around */
clk_disable(priv->usb24); /* usb work around */
}
clk_disable(priv->pci); /* usb work around */
clk_disable(priv->usb24); /* usb work around */
}
}
static int usbhsf_get_vbus(struct platform_device *pdev)
}
static int usbhsf_get_vbus(struct platform_device *pdev)
-static void usbhsf_hardware_exit(struct platform_device *pdev)
+static int usbhsf_hardware_exit(struct platform_device *pdev)
{
struct usbhsf_private *priv = usbhsf_get_priv(pdev);
{
struct usbhsf_private *priv = usbhsf_get_priv(pdev);
priv->usbh_base = NULL;
free_irq(IRQ7, pdev);
priv->usbh_base = NULL;
free_irq(IRQ7, pdev);
}
static int usbhsf_hardware_init(struct platform_device *pdev)
}
static int usbhsf_hardware_init(struct platform_device *pdev)
return !((1 << 7) & __raw_readw(priv->cr2));
}
return !((1 << 7) & __raw_readw(priv->cr2));
}
-static void usbhs_phy_reset(struct platform_device *pdev)
+static int usbhs_phy_reset(struct platform_device *pdev)
{
struct usbhs_private *priv = usbhs_get_priv(pdev);
/* init phy */
__raw_writew(0x8a0a, priv->cr2);
{
struct usbhs_private *priv = usbhs_get_priv(pdev);
/* init phy */
__raw_writew(0x8a0a, priv->cr2);
}
static int usbhs_get_id(struct platform_device *pdev)
}
static int usbhs_get_id(struct platform_device *pdev)
-static void usbhs_hardware_exit(struct platform_device *pdev)
+static int usbhs_hardware_exit(struct platform_device *pdev)
{
struct usbhs_private *priv = usbhs_get_priv(pdev);
{
struct usbhs_private *priv = usbhs_get_priv(pdev);
__raw_writew(USB_PHY_MODE | USB_PHY_INT_CLR, priv->phy);
free_irq(IRQ15, pdev);
__raw_writew(USB_PHY_MODE | USB_PHY_INT_CLR, priv->phy);
free_irq(IRQ15, pdev);
}
static u32 usbhs_pipe_cfg[] = {
}
static u32 usbhs_pipe_cfg[] = {
return usbhs_is_connected(usbhs_get_priv(pdev));
}
return usbhs_is_connected(usbhs_get_priv(pdev));
}
-static void usbhs_phy_reset(struct platform_device *pdev)
+static int usbhs_phy_reset(struct platform_device *pdev)
{
struct usbhs_private *priv = usbhs_get_priv(pdev);
/* init phy */
__raw_writew(0x8a0a, priv->usbcrcaddr);
{
struct usbhs_private *priv = usbhs_get_priv(pdev);
/* init phy */
__raw_writew(0x8a0a, priv->usbcrcaddr);
}
static int usbhs0_get_id(struct platform_device *pdev)
}
static int usbhs0_get_id(struct platform_device *pdev)
-static void usbhs0_hardware_exit(struct platform_device *pdev)
+static int usbhs0_hardware_exit(struct platform_device *pdev)
{
struct usbhs_private *priv = usbhs_get_priv(pdev);
cancel_delayed_work_sync(&priv->work);
{
struct usbhs_private *priv = usbhs_get_priv(pdev);
cancel_delayed_work_sync(&priv->work);
}
static struct usbhs_private usbhs0_private = {
}
static struct usbhs_private usbhs0_private = {
-static void usbhs1_hardware_exit(struct platform_device *pdev)
+static int usbhs1_hardware_exit(struct platform_device *pdev)
{
struct usbhs_private *priv = usbhs_get_priv(pdev);
{
struct usbhs_private *priv = usbhs_get_priv(pdev);
__raw_writew(USB_PHY_MODE | USB_PHY_INT_CLR, priv->usbphyaddr);
free_irq(IRQ8, pdev);
__raw_writew(USB_PHY_MODE | USB_PHY_INT_CLR, priv->usbphyaddr);
free_irq(IRQ8, pdev);
}
static int usbhs1_get_id(struct platform_device *pdev)
}
static int usbhs1_get_id(struct platform_device *pdev)
return gpio_get_value(GPIO_PTB3);
}
return gpio_get_value(GPIO_PTB3);
}
-static void usbhs_phy_reset(struct platform_device *pdev)
+static int usbhs_phy_reset(struct platform_device *pdev)
{
/* enable vbus if HOST */
if (!gpio_get_value(GPIO_PTB3))
gpio_set_value(GPIO_PTB5, 1);
{
/* enable vbus if HOST */
if (!gpio_get_value(GPIO_PTB3))
gpio_set_value(GPIO_PTB5, 1);
}
static struct renesas_usbhs_platform_info usbhs_info = {
}
static struct renesas_usbhs_platform_info usbhs_info = {
-struct usbhsg_recip_handle req_clear_feature = {
+static struct usbhsg_recip_handle req_clear_feature = {
.name = "clear feature",
.device = usbhsg_recip_handler_std_control_done,
.interface = usbhsg_recip_handler_std_control_done,
.name = "clear feature",
.device = usbhsg_recip_handler_std_control_done,
.interface = usbhsg_recip_handler_std_control_done,
-struct usbhsg_recip_handle req_set_feature = {
+static struct usbhsg_recip_handle req_set_feature = {
.name = "set feature",
.device = usbhsg_recip_handler_std_set_device,
.interface = usbhsg_recip_handler_std_control_done,
.name = "set feature",
.device = usbhsg_recip_handler_std_set_device,
.interface = usbhsg_recip_handler_std_control_done,
-struct usbhsg_recip_handle req_get_status = {
+static struct usbhsg_recip_handle req_get_status = {
.name = "get status",
.device = usbhsg_recip_handler_std_get_device,
.interface = usbhsg_recip_handler_std_get_interface,
.name = "get status",
.device = usbhsg_recip_handler_std_get_device,
.interface = usbhsg_recip_handler_std_get_interface,
* Hardware exit function for platform.
* it is called when driver was removed
*/
* Hardware exit function for platform.
* it is called when driver was removed
*/
- void (*hardware_exit)(struct platform_device *pdev);
+ int (*hardware_exit)(struct platform_device *pdev);
/*
* option:
*
* for board specific clock control
*/
/*
* option:
*
* for board specific clock control
*/
- void (*power_ctrl)(struct platform_device *pdev,
+ int (*power_ctrl)(struct platform_device *pdev,
void __iomem *base, int enable);
/*
void __iomem *base, int enable);
/*
*
* Phy reset for platform
*/
*
* Phy reset for platform
*/
- void (*phy_reset)(struct platform_device *pdev);
+ int (*phy_reset)(struct platform_device *pdev);