lkml.org 
[lkml]   [2011]   [Apr]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH] rfkill: Regulator consumer driver for rfkill
    From
    Date
    On Wed, 2011-04-06 at 22:17 +0200, Johannes Berg wrote:
    > On Wed, 2011-04-06 at 22:15 +0200, Johannes Berg wrote:
    > > On Wed, 2011-04-06 at 22:10 +0200, Paul Bolle wrote:
    > > > On Wed, 2011-04-06 at 14:38 -0400, John W. Linville wrote:
    > > > > The syntax may seem strange,
    > > >
    > > > It does!
    > > >
    > > > > but basically it just says "don't let me by y if RFKILL is m"
    > > >
    > > > ... but, besides that, I can be any value. So in effect it's shorthand
    > > > for
    > > > depends on RFKILL=y || RFKILL=m && m || RFKILL=n
    > > >
    > > > (which actually looks equally strange). Is that correct?
    > >
    > > I don't think it is, I believe that an expression like "RFKILL=y" has a
    > > bool type, and a tristate type value that depends on a bool type can
    > > still take the value m.
    >
    > Err, which is of course perfectly fine since if RFKILL is built in this
    > can be any value, and in the RFKILL=m case you force it to m by making
    > it depend on m directly. So yes, you're right.

    Whoops ... sorry about the talking to self ...

    I still think the original is easier to understand. After all, just
    depends on RFKILL
    is trivial to understand even with tristates. And knowing that RFKILL
    will provide no-op inlines when it is unconfigured, you add
    depends on !RFKILL
    for that case.

    johannes



    \
     
     \ /
      Last update: 2011-04-06 22:29    [W:0.021 / U:0.304 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site