Re: [PATCH v2 2/3] input: touch: ads7846: switch to devm initialization

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

 



Hi Marco,

On 5/5/20 10:37 AM, Marco Felsch wrote:
> also here, pls align the patch subject with the existing ones, so the
> prefix should be "Input: ads7846 - ".
> 
> On 20-05-04 19:37, Daniel Mack wrote:
>> This simplies the code a lot and fixes some potential resource leaks in
>> the error return paths. It also ensures the input device is registered
>> before the interrupt is requested, as the IRQ handler will commit events
>> when it fires.
> 
> Pls adapt the commit message too.
> 
>> Signed-off-by: Daniel Mack <daniel@xxxxxxxxxx>

>> -static void ads784x_hwmon_unregister(struct spi_device *spi,
>> -				     struct ads7846 *ts)
>> -{
>> -	if (ts->hwmon)
>> -		hwmon_device_unregister(ts->hwmon);
>> +	return PTR_ERR_OR_ZERO(hwmon);
>>  }
> 
> Nit:
> return PTR_ERR_OR_ZERO(devm_hwmon_device_register_with_groups())

I tried that before, but it looks ugly and breaks the coding style
rules. So I'll leave that one out.

The rest of your comments I agree with. Thanks again!


Daniel



[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux