lkml.org 
[lkml]   [2019]   [Feb]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v6 5/8] soc: qcom: Add AOSS QMP communication driver
Hi,

On Tue, Feb 5, 2019 at 9:13 PM Bjorn Andersson
<bjorn.andersson@linaro.org> wrote:
> + if (of_property_read_bool(pdev->dev.of_node, "#power-domain-cells")) {
> + qmp->pd_pdev = platform_device_register_data(&pdev->dev,
> + "aoss_qmp_pd",
> + PLATFORM_DEVID_NONE,
> + NULL, 0);
> + if (IS_ERR(qmp->pd_pdev)) {
> + dev_err(&pdev->dev, "failed to register AOSS PD\n");

nit: not worth spinning just for this, but if you happen to spin you
could print the error number in your message.


> + ret = PTR_ERR(qmp->pd_pdev);
> + goto err_close_qmp;
> + }
> + }

As discussed in v5 I wonder if the complexity of a separate driver is
really worth it or if everything would be a lot easier to just link
the two ".c" files together. Now that it's a full error case if
"aoss_qmp_pd" doesn't probe I'd vote for linking the two ".c" files
together, but part of that is because I don't really want to dig into
all the details of how you're supposed to call
platform_device_register_data() for sub-devices and double-checking
that you've got all the corner cases correct.

...NOTE: presumably if you just change it to a straight-up function
call then you can also get rid of the above "dev_err" since
(presumably) you'll know that the init code of aoss_qmp_pd will print
any relevant errors?


-Doug

\
 
 \ /
  Last update: 2019-02-11 23:31    [W:0.083 / U:6.972 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site