Re: [PATCH] drivers: treewide: Do not use NULL as driver_data

2025-09-20 Thread Ahmad Fatoum
On 9/17/25 4:02 PM, Sascha Hauer wrote: > On Tue, Sep 16, 2025 at 11:38:48AM +0200, Ahmad Fatoum wrote: >> Hello Sascha, >> >> On 9/16/25 11:32 AM, Sascha Hauer wrote: >>> Several drivers in the tree use an enum for the chip type casted to int >>> as driver_data. This comes with the problem that de

Re: [PATCH] drivers: treewide: Do not use NULL as driver_data

2025-09-17 Thread Sascha Hauer
On Tue, Sep 16, 2025 at 11:38:48AM +0200, Ahmad Fatoum wrote: > Hello Sascha, > > On 9/16/25 11:32 AM, Sascha Hauer wrote: > > Several drivers in the tree use an enum for the chip type casted to int > > as driver_data. This comes with the problem that device_get_match_data() > > returns NULL for t

Re: [PATCH] drivers: treewide: Do not use NULL as driver_data

2025-09-16 Thread Ahmad Fatoum
Hello Sascha, On 9/16/25 11:32 AM, Sascha Hauer wrote: > Several drivers in the tree use an enum for the chip type casted to int > as driver_data. This comes with the problem that device_get_match_data() > returns NULL for these devices and a potential error check bails out > then. > > This patch

[PATCH] drivers: treewide: Do not use NULL as driver_data

2025-09-16 Thread Sascha Hauer
Several drivers in the tree use an enum for the chip type casted to int as driver_data. This comes with the problem that device_get_match_data() returns NULL for these devices and a potential error check bails out then. This patch changes the enums used by the drivers to start from 1 instead of 0