Am 25.01.2017 um 22:28 schrieb John Youn:
> On 1/15/2017 12:37 PM, Heiner Kallweit wrote:
>> Set the iomem parameters in the usb_hcd to fix this misleading
>> message during driver load:
>> dwc2 c9100000.usb: irq 22, io mem 0x00000000
>>
>> Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com>
>> ---
>>  drivers/usb/dwc2/core.h     | 3 ++-
>>  drivers/usb/dwc2/hcd.c      | 5 ++++-
>>  drivers/usb/dwc2/hcd.h      | 3 ++-
>>  drivers/usb/dwc2/platform.c | 2 +-
>>  4 files changed, 9 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/usb/dwc2/core.h b/drivers/usb/dwc2/core.h
>> index 9548d3e0..b66eaeea 100644
>> --- a/drivers/usb/dwc2/core.h
>> +++ b/drivers/usb/dwc2/core.h
>> @@ -1229,7 +1229,8 @@ static inline void dwc2_hcd_connect(struct dwc2_hsotg 
>> *hsotg) {}
>>  static inline void dwc2_hcd_disconnect(struct dwc2_hsotg *hsotg, bool 
>> force) {}
>>  static inline void dwc2_hcd_start(struct dwc2_hsotg *hsotg) {}
>>  static inline void dwc2_hcd_remove(struct dwc2_hsotg *hsotg) {}
>> -static inline int dwc2_hcd_init(struct dwc2_hsotg *hsotg, int irq)
>> +static inline int dwc2_hcd_init(struct dwc2_hsotg *hsotg, int irq,
>> +                            struct resource *res)
>>  { return 0; }
>>  static inline int dwc2_backup_host_registers(struct dwc2_hsotg *hsotg)
>>  { return 0; }
>> diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c
>> index 911c3b36..2cfbd10e 100644
>> --- a/drivers/usb/dwc2/hcd.c
>> +++ b/drivers/usb/dwc2/hcd.c
>> @@ -4964,7 +4964,7 @@ static void dwc2_hcd_release(struct dwc2_hsotg *hsotg)
>>   * USB bus with the core and calls the hc_driver->start() function. It 
>> returns
>>   * a negative error on failure.
>>   */
>> -int dwc2_hcd_init(struct dwc2_hsotg *hsotg, int irq)
>> +int dwc2_hcd_init(struct dwc2_hsotg *hsotg, int irq, struct resource *res)
>>  {
>>      struct usb_hcd *hcd;
>>      struct dwc2_host_chan *channel;
>> @@ -5021,6 +5021,9 @@ int dwc2_hcd_init(struct dwc2_hsotg *hsotg, int irq)
>>
>>      hcd->has_tt = 1;
>>
>> +    hcd->rsrc_start = res->start;
>> +    hcd->rsrc_len = resource_size(res);
> 
> You should be able to get the same from hsotg->dev instead of adding a
> paramter.
> 
> In fact, looks like the irq parameter is not needed either since it is 
> already stored in hsotg and can anyway get it from dev as well.
> 
> John
> 
Indeed. I'll send a v2 for the patch and another one for getting rid of
the irq function parameter.

Heiner

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

Reply via email to