From: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
To: andy.sharp@onstor.com
Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
p_gortmaker@yahoo.com, a.zummo@towertech.it
Subject: Re: [PATCH] Platform real time clock driver for Dallas 1511 chip.
Date: Thu, 06 Dec 2007 00:32:58 +0900 (JST) [thread overview]
Message-ID: <20071206.003258.115905122.anemo@mba.ocn.ne.jp> (raw)
In-Reply-To: <20071205004643.GA15429@onstor.com>
On Tue, 4 Dec 2007 16:46:51 -0800, Andrew Sharp <andy.sharp@onstor.com> wrote:
> +struct rtc_plat_data {
> + struct rtc_device *rtc;
> + void __iomem *ioaddr; /* virtual base address */
> + unsigned long baseaddr; /* physical base address */
> + int size; /* amount of memory mapped */
> + int irq;
> + unsigned int irqen;
> + int alrm_sec;
> + int alrm_min;
> + int alrm_hour;
> + int alrm_mday;
> +};
> +
> +static DEFINE_SPINLOCK(ds1511_lock);
> +
> +static __iomem char *ds1511_base;
If you used ds1511_base, ioaddr in rtc_plat_data is not needed.
> + static noinline void
> +rtc_write(uint8_t val, uint32_t reg)
> +{
> + writeb(val, ds1511_base + (reg * reg_spacing));
> +}
Still "noinline" here and there.
> +static struct bin_attribute ds1511_nvram_attr = {
> + .attr = {
> + .name = "nvram",
> + .mode = S_IRUGO | S_IWUGO,
> + .owner = THIS_MODULE,
> + },
> + .size = DS1511_RAM_MAX,
> + .read = ds1511_nvram_read,
> + .write = ds1511_nvram_write,
> +};
It would be better to use S_IWUSR instead of S_IWUGO. Please check
rtc-ds1553 changes in current git tree.
> +static struct platform_driver ds1511_rtc_driver = {
> + .probe = ds1511_rtc_probe,
> + .remove = __devexit_p(ds1511_rtc_remove),
> + .driver = {
> + .name = "ds1511",
> + .owner = THIS_MODULE,
> + },
> +};
Use "rtc-ds1511" for driver name for hotplugging. Please check
rtc-ds1553 changes in current git tree.
> + static void __exit
> +ds1511_rtc_exit(void)
> +{
> + return platform_driver_unregister(&ds1511_rtc_driver);
> +}
Do not return void value. Please check rtc-ds1553 changes in current
git tree.
---
Atsushi Nemoto
next prev parent reply other threads:[~2007-12-05 15:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-05 0:46 Andrew Sharp
2007-12-05 15:32 ` Atsushi Nemoto [this message]
-- strict thread matches above, loose matches on Subject: below --
2007-12-04 20:00 Andrew Sharp
2007-12-04 21:04 ` Andrew Morton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071206.003258.115905122.anemo@mba.ocn.ne.jp \
--to=anemo@mba.ocn.ne.jp \
--cc=a.zummo@towertech.it \
--cc=akpm@linux-foundation.org \
--cc=andy.sharp@onstor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=p_gortmaker@yahoo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®