lkml.org 
[lkml]   [2010]   [Jun]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [rtc-linux] [PATCH] rtc: driver for the DryIce block found in i.MX25 chips
    Hi Wan,

    On Sat, Jun 05, 2010 at 11:08:46PM +0800, Wan ZongShun wrote:
    > Some minor comments below:

    One question though.

    > > +/*
    > > + * read the seconds portion of the current time from the dryice time counter
    > > + */
    > > +static int dryice_rtc_read_time(struct device *dev, struct rtc_time *tm)
    > > +{
    > > +       struct imxdi_dev *imxdi = dev_get_drvdata(dev);
    > > +       unsigned long now;
    > > +
    > > +       now = __raw_readl(imxdi->ioaddr + DTCMR);
    > > +       rtc_time_to_tm(now, tm);
    > > +
    >
    > When we want to return a tm value, call rtc_valid_tm() to check the tm
    > that is a good habit.

    Isn't rtc_time_to_tm() guaranteed to produce a valid tm value?

    >
    > > +       return 0;
    > > +}

    baruch

    --
    ~. .~ Tk Open Systems
    =}------------------------------------------------ooO--U--Ooo------------{=
    - baruch@tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
    --
    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: 2010-06-07 07:23    [W:0.026 / U:92.496 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site