lkml.org 
[lkml]   [2007]   [May]   [25]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
    /
    DateFri, 25 May 2007 10:30:20 +0200
    From"Jiri Slaby" <>
    SubjectRe: [PATCH 1/1] V4L: stk11xx, add a new webcam driver
    On 5/25/07, Stefan Richter <stefanr@s5r6.in-berlin.de> wrote:
    > Jiri Slaby wrote:> > On 5/24/07, Markus Rechberger <mrechberger@gmail.com> wrote:
    > >> On 5/24/07, Jiri Slaby <jirislaby@gmail.com> wrote:
    > > [...]
    > >> > +static int stk1125_camera_asleep(struct stk11xx *dev)
    > >> > +{> >> > +     int value;> >> > +> >> > +     stk11xx_read_registry(dev, 0x0104, &value);
    > >> > +     stk11xx_read_registry(dev, 0x0105, &value);
    > >> > +     stk11xx_read_registry(dev, 0x0106, &value);
    > >> > +> >>> >> why do you read these values (this is also something in the ongoing
    > >> code I see, the read value just gets overwritten all the time)?
    > >
    > > Well, as I tested, reads are neccesary, otherwise it doesn't work. And
    > > when they are needed, you need to read the value to some place in
    > > memory -- the &value.>> Perhaps a few comments are warranted here and there about why some of
    > those less obvious things are done.>> Or do it as more or less self-documenting code like
    >> static inline void> stk11xx_unjam_registry(struct stk11xx *dev, u16 index)
    > {>         int dummy;
    >
    >         stk11xx_read_registry(dev, index, &dummy);
    > }
    
    yeah, seems reasonable to me.
    
    thanks,
    -- 
    http://www.fi.muni.cz/~xslaby/            Jiri Slaby
    faculty of informatics, masaryk university, brno, cz
    e-mail: jirislaby gmail com, gpg pubkey fingerprint:
    B674 9967 0407 CE62 ACC8  22A0 32CC 55C3 39D4 7A7E
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at  http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at  http://www.tux.org/lkml/
    
    
    \
     
     \ /
      Last update: 2007-05-25 10:33    [from the cache]
    ©2003-2008