From: Sergey Yanovich <ynvich@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: rtc-linux@googlegroups.com, linux-kernel@vger.kernel.org,
Marc Zyngier <maz@misterjones.org>,
Alessandro Zummo <a.zummo@towertech.it>,
Sachin Kamat <sachin.kamat@linaro.org>,
Jingoo Han <jg1.han@samsung.com>
Subject: Re: [PATCH] rtc-ds1302: handle write protection
Date: Thu, 30 May 2013 14:14:42 +0400 [thread overview]
Message-ID: <1369908882.17429.13.camel@host5.omatika.ru> (raw)
In-Reply-To: <20130529155311.9e35e847968f3923bc83f4cd@linux-foundation.org>
On Wed, 2013-05-29 at 15:53 -0700, Andrew Morton wrote:
> On Tue, 21 May 2013 03:21:30 +0400 Sergey Yanovich <ynvich@gmail.com> wrote:
> @@ -321,6 +326,7 @@ static int ds1302_rtc_remove(struct platform_device *pdev)
> > {
> > struct rtc_device *rtc = platform_get_drvdata(pdev);
> >
> > + ds1302_writebyte(RTC_ADDR_CTRL, RTC_CMD_WRITE_DISABLE);
> > rtc_device_unregister(rtc);
> > platform_set_drvdata(pdev, NULL);
>
> ds1302_rtc_remove() no longer exists in my tree - it got whittled away
> to nothing by
> http://ozlabs.org/~akpm/mmots/broken-out/rtc-rtc-ds1302-remove-unnecessary-platform_set_drvdata.patch
> and
> http://ozlabs.org/~akpm/mmots/broken-out/drivers-rtc-rtc-ds1302c-remove-empty-function.patch
>
> Perhaps it should be re-added for this?
There are 2 options. I would be happy with either.
1. I've chosen 'probe/remove' to enable/disable write access.
2. Another option is to wrap enable/disable around
ds1302_rtc_set_time().
IIUC, the former saves a few bytes of memory. However, now, when
ds1302_rtc_remove() is gone, the latter looks better. So I could rewrite
the patch either way.
next prev parent reply other threads:[~2013-05-30 10:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-20 23:21 [PATCH] rtc-ds1302: handle write protection Sergey Yanovich
2013-05-29 22:53 ` Andrew Morton
2013-05-30 10:14 ` Sergey Yanovich [this message]
2013-05-30 10:20 ` Marc Zyngier
2013-05-30 16:04 ` Sergey Yanovich
2013-05-31 12:48 ` Marc Zyngier
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=1369908882.17429.13.camel@host5.omatika.ru \
--to=ynvich@gmail.com \
--cc=a.zummo@towertech.it \
--cc=akpm@linux-foundation.org \
--cc=jg1.han@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maz@misterjones.org \
--cc=rtc-linux@googlegroups.com \
--cc=sachin.kamat@linaro.org \
/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