Re: [PATCH] i2c: Do not give adapters a default parent

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jul 23, 2009 at 16:02, Jean Delvare<khali@xxxxxxxxxxxx> wrote:
> On Wed, 22 Jul 2009 23:04:48 +0200, Kay Sievers wrote:

>> +     return sysfs_remove_link(cls->kobj, dev_name(dev));
>
> I don't think you need the "return" here, as sysfs_remove_link returns
> void.

Fixed. Thanks.

> Other than that (and in practice even with that) your patch works just
> fine for me. Thanks! Unfortunately it doesn't provide perfect
> compatibility, [...] to add this device link (pointing to "..") temporarily
> or would that be too confusing?

I think that's ok, if it solves a real problem. The entire idea of _a_
"device" link is pretty flawed, and the reason we ripped all the
"struct class_device" devices out.

> Another thing we have to discuss is the compatibility option. For now
> I've made it i2c-specific and enabled by default:
>
> config I2C_COMPAT
>        boolean "Enable compatibility bits for old user-space"
>        default y
>        help
>          Say Y here if you intend to run lm-sensors 3.1.1 or older.
>
> But this means a lot of ifdefs in my code (6). With a system-wide
> option, we could provide empty stubs I could get rid of them. OTOH, It
> is easier to control the lifetime, and change the default value, of a
> subsystem specific option. So I'm not too sure what do to.

I'm not sure too. I think it's fine to have it per-subsytem, as only
the subsystem knows for how long it is needed, and it can probably be
dropped some day.

> Maybe it
> depends on how many subsystems will need the compatibility layer... Do
> you have an opinion?

I don't know of any other subsytem needing that, I've seen some just
moving things around without taking care about that. :)

Thanks,
Kay
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux