[PATCH v2 1/2] Input: tegra-kbc - add device tree bindings

Olof Johansson olof at lixom.net
Wed Dec 28 18:10:37 EST 2011


Hi,

On Tue, Dec 27, 2011 at 10:48 PM, Dmitry Torokhov
<dmitry.torokhov at gmail.com> wrote:
> Hi Olof,
>
> On Tue, Dec 27, 2011 at 10:19:29PM -0800, Olof Johansson wrote:
>> This adds a simple device tree binding to the tegra keyboard controller.
>>
>> Also, mark the default keymap as __devinitdata since it is not referenced
>> after boot, and shorten the name to not have to avoid line wraps.
>
> No, let's keep the names prefixed to match the rest of the driver(s).

Sure, if you prefer.

>> +
>> +     pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL);
>
> Error handling is missing. I also dislike devm_* facilities as it causes
> inconsistencies in the way we handle releasing of resources: some of
> them will be released automatically while others need t be released
> manually. I prefer having consistent model.

I disagree -- I think the devm allocators are an excellent invention
instead of open-coding the error handling, which tends to be error
prone and just adds special cases just like you explained below.

But, it's your subsystem and with that being said...

> Does the patch below still work for you?

... sure, if you're happy I'm happy -- it gets the work done, couldn't
ask for more. No need to argue the details further. :)


-Olof


More information about the devicetree-discuss mailing list