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

From: Felipe Balbi
Date: Fri Jun 10 2016 - 04:12:33 EST



Hi,

Roger Quadros <rogerq@xxxxxx> 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: signature.asc
Description: PGP signature