Re: [PATCH 2/3] w1: move slave uevent into w1_slave_device_type
From: Danilo Krummrich
Date: Tue Sep 08 2026 - 15:12:42 EST
On Tue Sep 8, 2026 at 4:54 PM CEST, Krzysztof Kozlowski wrote:
> On 21/08/2026 00:54, Danilo Krummrich wrote:
>> The bus-level w1_uevent() only ever added uevent variables (W1_FID,
>> W1_SLAVE_ID) for slave devices.
>
> I don't follow why only for slave. I see the w1_uevent() being part of
> w1_master_driver and so on as well.
The only thing w1_uevent() does for w1_master_driver is printing
dev_dbg(dev, "Hotplug event for %s %s, bus_id=%s.\n",
event_owner, name, dev_name(dev));
W1_FID and W1_SLAVE_ID are only ever set for slave drivers.
I think the dev_dbg() wasn't overly useful as uevents can be read from userspace
anyway, which is why I dropped it.
>> Move the slave uevent logic into w1_slave_device_type.uevent where it
>> naturally belongs and remove the bus-level uevent callback entirely.
>>
>> Signed-off-by: Danilo Krummrich <dakr@xxxxxxxxxx>
>> ---
>> Compile-tested only, no hardware available.
>>
>> I think the dev_dbg() stuff wasn't really useful, so I dropped it.
>> ---
>
>
> Best regards,
> Krzysztof