Re: [PATCH 1/3] w1: use match() callback instead of hardwiring dev->driver
From: Danilo Krummrich
Date: Tue Sep 08 2026 - 15:08:03 EST
On Tue Sep 8, 2026 at 4:49 PM CEST, Krzysztof Kozlowski wrote:
> On 21/08/2026 00:54, Danilo Krummrich wrote:
>> static const struct bus_type w1_bus_type = {
>> .name = "w1",
>> + .match = w1_match,
>> .uevent = w1_uevent,
>> };
>>
>> struct device_driver w1_master_driver = {
>> .name = "w1_master_driver",
>> .bus = &w1_bus_type,
>> - .probe = w1_master_probe,
>> };
>>
>> struct device w1_master_device = {
>> .parent = NULL,
>> .bus = &w1_bus_type,
>> + .type = &w1_master_device_type,
>> .init_name = "w1 bus master",
>> - .driver = &w1_master_driver,
>> .release = &w1_master_release
>> };
>>
>> @@ -195,8 +208,8 @@ static struct device_driver w1_slave_driver = {
>> struct device w1_slave_device = {
>> .parent = NULL,
>> .bus = &w1_bus_type,
>> + .type = &w1_slave_device_type,
>
> This code is disabled, so probably should be cleaned up before we start
> improving it.
Maybe? I don't know if it was left there intentionally. So I just adjusted it
conservatively, as it's also technically unrelated.
If it wasn't left there on purpose, I can add a preceding patch to remove it.