lkml.org 
[lkml]   [2021]   [Nov]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v4 10/11] platform/x86: int3472: Pass tps68470_regulator_platform_data to the tps68470-regulator MFD-cell
From
Hi,

On 10/25/21 13:38, Andy Shevchenko wrote:
> On Mon, Oct 25, 2021 at 12:42 PM Hans de Goede <hdegoede@redhat.com> wrote:
>>
>> Pass tps68470_regulator_platform_data to the tps68470-regulator
>> MFD-cell, specifying the voltages of the various regulators and
>> tying the regulators to the sensor supplies so that sensors which use
>> the TPS68470 can find their regulators.
>>
>> Since the voltages and supply connections are board-specific, this
>> introduces a DMI matches int3472_tps68470_board_data struct which
>> contains the necessary per-board info.
>>
>> This per-board info also includes GPIO lookup information for the
>> sensor GPIOs which may be connected to the tps68470 gpios.
>
> gpios --> GPIO lines

Fixed for v5.


> ...
>
>> + board_data = int3472_tps68470_get_board_data(dev_name(&client->dev));
>
>> + if (board_data)
>
> IIRC it's a dup. Below already incorporates this.
>
>> + gpiod_remove_lookup_table(board_data->tps68470_gpio_lookup_table);

Not sure what you mean here? This line *dereferences* board_data, so even if
gpiod_remove_lookup_table() already contains a NULL check for the table pointer,
we still need the board_data check to avoid dereferencing it to get
the tps68470_gpio_lookup_table member.

Regards,

Hans

\
 
 \ /
  Last update: 2021-11-01 12:33    [W:0.078 / U:0.252 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site