Skip to content

Commit ca65631

Browse files
committed
usb: gadget: udc: atmel: get pointer to PMC only if needed.
Get the pointer to PMC only for the SoCs that need it to perform toggle_bias or pulse_bias. Fixes: cbfe448 ("usb: gadget: udc: atmel: rename errata into caps") Signed-off-by: Cristian Birsan <cristian.birsan@microchip.com>
1 parent 64d7cb6 commit ca65631

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

drivers/usb/gadget/udc/atmel_usba_udc.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2018,7 +2018,6 @@ static const struct of_device_id atmel_pmc_dt_ids[] = {
20182018
{ .compatible = "atmel,at91sam9g45-pmc" },
20192019
{ .compatible = "atmel,at91sam9rl-pmc" },
20202020
{ .compatible = "atmel,at91sam9x5-pmc" },
2021-
{ .compatible = "microchip,sam9x60-pmc" },
20222021
{ /* sentinel */ }
20232022
};
20242023

@@ -2038,7 +2037,7 @@ static struct usba_ep * atmel_udc_of_init(struct platform_device *pdev,
20382037
return ERR_PTR(-EINVAL);
20392038

20402039
udc->caps = match->data;
2041-
if (udc->caps) {
2040+
if (udc->caps && (udc->caps->pulse_bias || udc->caps->toggle_bias)) {
20422041
pp = of_find_matching_node_and_match(NULL, atmel_pmc_dt_ids,
20432042
NULL);
20442043
if (!pp)

0 commit comments

Comments
 (0)