Re: [PATCH v2 2/9] ehci-platform: add pre_setup() method to platform data

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

 



Hello.

On 09-04-2013 3:42, Greg KH wrote:

Sometimes there is a need  to initialize some non-standard
registers mapped to
the EHCI region before accessing the standard EHCI registers.
Add pre_setup()
method with 'struct usb_hcd *' parameter to be called just
before ehci_setup()
to the 'ehci-platform'  driver's platform data for this purpose...

Suggested-by: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx>
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@xxxxxxxxxxxxxxxxxx>

[...]
Index: renesas/include/linux/usb/ehci_pdriver.h
===================================================================
--- renesas.orig/include/linux/usb/ehci_pdriver.h
+++ renesas/include/linux/usb/ehci_pdriver.h
@@ -19,6 +19,8 @@
  #ifndef __USB_CORE_EHCI_PDRIVER_H
  #define __USB_CORE_EHCI_PDRIVER_H
  +#include <linux/usb/hcd.h>

This isn't needed in the .h file, right?  Only the .c file, if it hasn't
already included it (hint, I bet it has...)

   No, it hasn't. And I wouldn't want to include this header in the
platform code.

    Although, if you insist...

    It just occured to me that this file doesn't have 'struct
platform_device'
pre-declared either -- in the "best" tradition of the USB header files. :-)

Yes, if the .h file doesn't need it, don't include it in the .h file.
Include it in the .c file instead.

The ehci_pdriver.h still needs 'struct platfrom_device' declared. It shouldn't rely on the order of other #include's in the .c file that includes it. That's simply wrong, and I'm adding incomplete declaration while I am touching this file...

thanks,

greg k-h

WBR, Sergei

--
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