Re: [PATCH v9 5/5] usb: dwc3: core: cleanup IRQ resources

Felipe Balbi
2016-06-10T08:12:28Z

[-- Attachment #1: Type: text/plain, Size: 738 bytes --]

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]