Re: [PATCH v4 12/13] i2c: qcom-geni: Store of_device_id data in driver private struct
From: Praveen Talari
Date: Wed Feb 04 2026 - 00:04:52 EST
Hi Konrad,
On 2/3/2026 5:55 PM, Konrad Dybcio wrote:
On 2/2/26 7:09 PM, Praveen Talari wrote:
To avoid repeatedly fetching and checking platform data across various
functions, store the struct of_device_id data directly in the i2c
private structure. This change enhances code maintainability and reduces
redundancy.
Acked-by: Viken Dadhaniya <viken.dadhaniya@xxxxxxxxxxxxxxxx>
Signed-off-by: Praveen Talari <praveen.talari@xxxxxxxxxxxxxxxx>
---
[...]
- desc = device_get_match_data(&pdev->dev);
+ gi2c->dev_data = device_get_match_data(&pdev->dev);
Because you dereference it unconditionally later, this should be
null-checked
Initially this was added, but based on Bjorn’s comment like there is no possibility of getting a null value here since we are already adding the platform data to compatibles
Thanks,
Praveen Talari
Konrad