lkml.org 
[lkml]   [2003]   [Jul]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 11/17] Add a driver for the Technisat Skystar2 DVB card
    On Tue, Jul 15, 2003 at 02:20:57PM +0200, Michael Hunold wrote:
    > +
    > +/////////////////////////////////////////////////////////////////////
    > +// register functions
    > +/////////////////////////////////////////////////////////////////////
    > +
    > +void WriteRegDW(struct adapter *adapter, u32 reg, u32 value)

    Hm, this really isn't the proper Linux coding style. Please read
    Documentation/CodingStyle on how to name functions.

    > +{
    > + u32 flags;

    flags has to be a unsigned long.

    > +
    > + save_flags(flags);
    > + cli();

    Huh? Did you even compile this on a SMP kernel on 2.5? (Hint, it will
    not...) Please fix this up.

    > +u32 ReadRegDW(struct adapter *adapter, u32 reg)
    > +{
    > + return readl(adapter->io_mem + reg);
    > +}

    Why? Why not just write the readl() function whereever you call
    ReadRegDW?

    > +/////////////////////////////////////////////////////////////////////
    > +// I2C
    > +////////////////////////////////////////////////////////////////////
    > +
    > +u32 i2cMainWriteForFlex2(struct adapter * adapter, u32 command, u8 * buf, u32 retries)

    kernel functions traditionally return an int. A negative number if
    there is an error, and 0 if there isn't.

    Oh, any reason for not tying this to the existing i2c core?
    Or is that done somewhere else?

    thanks,

    greg k-h
    -
    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: 2005-03-22 13:46    [W:3.214 / U:0.012 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site