lkml.org 
[lkml]   [2016]   [Jun]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v9 5/5] usb: dwc3: core: cleanup IRQ resources
Date

Hi,

Roger Quadros <rogerq@ti.com> writes:
>> Is it expected to have more than one IRQ here?
>>
>> if not - it will better to use platform_get_irq[_byname]().
>>
>
> The reason I used platform_get_resource variant is that i'm passing the
> resource directly to the XHCI platform device below.
>>
>>> +
>>> + dwc->xhci_resources[1].start = res->start;
>>> + dwc->xhci_resources[1].end = res->end;
>>> + dwc->xhci_resources[1].flags = res->flags;
>>> + dwc->xhci_resources[1].name = res->name;
>
> This could just change to
>
> dwc->xhci_resource[1] = *res;

no, it cannot. Look at the definition of struct resource and how it's
used, then you'll see we don't want to copy everything.

--
balbi
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2016-06-10 10:41    [W:0.390 / U:0.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site