[PATCH 4/4] Input: stmfts - use client to make future code cleaner
David Heidelberg
david at ixit.cz
Tue Dec 16 01:13:18 PST 2025
On 16/12/2025 07:13, Dmitry Torokhov wrote:
> Hi David,
>
> On Mon, Dec 15, 2025 at 03:30:04PM +0100, David Heidelberg via B4 Relay wrote:
>> From: Petr Hodina <petr.hodina at protonmail.com>
>>
>> Make code cleaner, compiler will optimize it away anyway.
>>
>> Preparation for FTM5 support, where more steps are needed.
>>
>> Signed-off-by: Petr Hodina <petr.hodina at protonmail.com>
>> Signed-off-by: David Heidelberg <david at ixit.cz>
>> ---
>> drivers/input/touchscreen/stmfts.c | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/input/touchscreen/stmfts.c b/drivers/input/touchscreen/stmfts.c
>> index 4b166b0a9a5a6..06845a00348cc 100644
>> --- a/drivers/input/touchscreen/stmfts.c
>> +++ b/drivers/input/touchscreen/stmfts.c
>> @@ -747,9 +747,10 @@ static int stmfts_runtime_suspend(struct device *dev)
>> static int stmfts_runtime_resume(struct device *dev)
>> {
>> struct stmfts_data *sdata = dev_get_drvdata(dev);
>> + struct i2c_client *client = sdata->client;
>> int ret;
>>
>> - ret = i2c_smbus_write_byte(sdata->client, STMFTS_SLEEP_OUT);
>> + ret = i2c_smbus_write_byte(client, STMFTS_SLEEP_OUT);
>
> Sorry but I do not see how using a temporary cleans things up compared
> to a simple structure member access, given that it happens only once
> here.
Thank you for applying rest of patchset.
This one can be postponed together with introducing fts5 support (where
we need do more steps here).
David
>
>> if (ret)
>> dev_err(dev, "failed to resume device: %d\n", ret);
>>
>>
>
> Thanks.
>
--
David Heidelberg
More information about the linux-arm-kernel
mailing list