On 13/12/15 22:07, Laurent Pinchart wrote: >> static int tpd_probe_of(struct platform_device *pdev) >> { >> @@ -282,11 +257,7 @@ static int tpd_probe(struct platform_device *pdev) >> >> platform_set_drvdata(pdev, ddata); >> >> - if (dev_get_platdata(&pdev->dev)) { >> - r = tpd_probe_pdata(pdev); >> - if (r) >> - return r; >> - } else if (pdev->dev.of_node) { >> + if (pdev->dev.of_node) { >> r = tpd_probe_of(pdev); >> if (r) >> return r; > > How about moving the else case not shown here to the beginning of the function > with > > if (!pdev->dev.of_node) > return -ENODEV; > > and lowering the indentation level here with just > > r = tpd_probe_of(pdev); > if (r) > return r; > > Apart from that the patch looks good to me. True, it can be cleaned up. I'll do that in a separate patch, so that this one stays simple. I can also move the contents of tpd_probe_of() into tpd_probe(), as there's no point in having a separate function for of. Tomi
Attachment:
signature.asc
Description: OpenPGP digital signature