Re: Issue with location of otg_ulpi_create()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 07/06/10 13:48, Gupta, Ajay Kumar wrote:
> I am trying to use definitions at ulpi.h in drivers/usb.host/ehci-omap.c
> For soft resetting the ULPI phy but I am getting below compilation warning.
>  
> include/linux/usb/ulpi.h:145: warning: 'struct otg_io_access_ops' declared inside parameter list
> include/linux/usb/ulpi.h:145: warning: its scope is only this definition or declaration, which is probably not what you want
>
> [ehci-omap.c is not suppose to include otg.h file]
>
> ulpi.h:145 has declaration of otg_ulpi_create().
> As 'struct otg_io_access_ops' is defined in otg.h so will it be fine to move
> Declaration of otg_ulpi_create() from ulpi.h to otg.h to fix the above
> issue? 
>   

OTG driver can live fine without the otg_ulpi_create().
otg_ulpi_create() is the one that depends on OTG and it is obvious
that ulpi.h needs the 'struct otg_io_access_ops' declaration,
so on my opinion it just needs the
#include <include/linux/usb/otg.h>

just like this:
------------------- cut ----------------------
diff --git a/include/linux/usb/ulpi.h b/include/linux/usb/ulpi.h
index 2369d07..ea330dc 100644
--- a/include/linux/usb/ulpi.h
+++ b/include/linux/usb/ulpi.h
@@ -11,6 +11,8 @@
 #ifndef __LINUX_USB_ULPI_H
 #define __LINUX_USB_ULPI_H

+#include <linux/usb/otg.h>
+
 /*-------------------------------------------------------------------------*/

 /*
------------------- cut ----------------------

> The change is copied below.
>
> Thanks,
> Ajay
> --------- cut ------------
> diff --git a/include/linux/usb/otg.h b/include/linux/usb/otg.h
> index f8302d0..288aec3 100644
> --- a/include/linux/usb/otg.h
> +++ b/include/linux/usb/otg.h
> @@ -242,4 +242,7 @@ otg_unregister_notifier(struct otg_transceiver *otg, struct notifier_block *nb)
>  /* for OTG controller drivers (and maybe other stuff) */
>  extern int usb_bus_start_enum(struct usb_bus *bus, unsigned port_num);
>
> +struct otg_transceiver *otg_ulpi_create(struct otg_io_access_ops *ops,
> +                                       unsigned int flags);
> +
>  #endif /* __LINUX_USB_OTG_H */
> diff --git a/include/linux/usb/ulpi.h b/include/linux/usb/ulpi.h
> index 2369d07..c324dce 100644
> --- a/include/linux/usb/ulpi.h
> +++ b/include/linux/usb/ulpi.h
> @@ -141,7 +141,4 @@
>
>  /*-------------------------------------------------------------------------*/
>
> -struct otg_transceiver *otg_ulpi_create(struct otg_io_access_ops *ops,
> -                                       unsigned int flags);
> -
>  #endif /* __LINUX_USB_ULPI_H */
> --------------------------
> --
> To unsubscribe from this list: send the line "unsubscribe linux-usb" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
>   

-- 
Regards,
Igor.

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux