Re: [PATCH 1/3] ARM: meson: reset: Add reset controller for MesonX SoCs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Sun, Oct 12, 2014 at 6:03 PM, Beniamino Galvani <b.galvani@xxxxxxxxx> wrote:
> Hi Carlo,

Hi Beniamino,

>> [...]
>> +
>> +static int meson_reset_probe(struct platform_device *pdev)
>> +{
>> +     struct meson_reset_data *data;
>> +     struct resource *res;
>> +
>> +     /*
>> +      * The binding was mainlined without the required property.
>> +      * Do not continue, when we encounter an old DT.
>> +      */
>> +     if (!of_find_property(pdev->dev.of_node, "#reset-cells", NULL)) {
>> +             dev_err(&pdev->dev, "%s missing #reset-cells property\n",
>> +                     pdev->dev.of_node->full_name);
>> +             return -EINVAL;
>> +     }
>
> Probably the above comment was taken from another driver but is not
> relevant here.

Right. Lazy copy and paste with brain off

>> +
>> +static int meson_reset_remove(struct platform_device *pdev)
>> +{
>> +     struct meson_reset_data *data = platform_get_drvdata(pdev);
>
> Don't you need to call platform_set_drvdata() in the probe() function
> for this to be valid?

Yes. Even though I believe the remove can never happen.

>> +
>> +     reset_controller_unregister(&data->rcdev);
>> +
>> +     return 0;
>> +}
>> +
>> +static const struct of_device_id meson_reset_dt_ids[] = {
>> +     { .compatible = "amlogic,meson6-rst-mgr-ao", },
>> +     { /* sentinel */ },
>> +};
>> +
>> +static struct platform_driver meson_reset_driver = {
>> +     .probe  = meson_reset_probe,
>> +     .remove = meson_reset_remove,
>> +     .driver = {
>> +             .name           = "meson-reset",
>> +             .owner          = THIS_MODULE,
>
> I believe you can drop the owner field.

I will.

Thank you for your review,

-- 
Carlo Caione
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux