From: Denis OSTERLAND <denis.osterland@diehl.com>
To: "alexandre.belloni@bootlin.com" <alexandre.belloni@bootlin.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"khoroshilov@ispras.ru" <khoroshilov@ispras.ru>,
Denis OSTERLAND <denis.osterland@diehl.com>
Subject: Re: rtc: isl1208: avoid possible sysfs race
Date: Tue, 25 Sep 2018 06:46:24 +0000 [thread overview]
Message-ID: <1537857983.4657.5.camel@diehl.com> (raw)
In-Reply-To: <20180915114343.31935-1-alexandre.belloni@bootlin.com>
Hi,
just for clarification:
This changes user-space representation from
/sys/class/rtc/rtcN/device/{atrim,dtrim,usr}
to
/sys/class/rtc/rtcN/{atrim,dtrim,usr}
and fixes the "mistake made back in 2006" you mention in
https://patchwork.ozlabs.org/patch/881397/
correct?
Regards Denis
Am Samstag, den 15.09.2018, 13:43 +0200 schrieb Alexandre Belloni:
> Use rtc_add_group to add the common sysfs group to avoid a possible race
> condition.
>
> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
> ---
> drivers/rtc/rtc-isl1208.c | 11 +----------
> 1 file changed, 1 insertion(+), 10 deletions(-)
>
> diff --git a/drivers/rtc/rtc-isl1208.c b/drivers/rtc/rtc-isl1208.c
> index ea18a8f4bce0..e1e9434c9972 100644
> --- a/drivers/rtc/rtc-isl1208.c
> +++ b/drivers/rtc/rtc-isl1208.c
> @@ -804,7 +804,7 @@ isl1208_probe(struct i2c_client *client, const struct i2c_device_id *id)
> evdet_irq = of_irq_get_byname(np, "evdet");
> }
>
> - rc = sysfs_create_group(&client->dev.kobj, &isl1208_rtc_sysfs_files);
> + rc = rtc_add_group(rtc, &isl1208_rtc_sysfs_files);
> if (rc)
> return rc;
>
> @@ -821,14 +821,6 @@ isl1208_probe(struct i2c_client *client, const struct i2c_device_id *id)
> return rtc_register_device(rtc);
> }
>
> -static int
> -isl1208_remove(struct i2c_client *client)
> -{
> - sysfs_remove_group(&client->dev.kobj, &isl1208_rtc_sysfs_files);
> -
> - return 0;
> -}
> -
> static const struct i2c_device_id isl1208_id[] = {
> { "isl1208", TYPE_ISL1208 },
> { "isl1218", TYPE_ISL1218 },
> @@ -851,7 +843,6 @@ static struct i2c_driver isl1208_driver = {
> .of_match_table = of_match_ptr(isl1208_of_match),
> },
> .probe = isl1208_probe,
> - .remove = isl1208_remove,
> .id_table = isl1208_id,
> };
>
Diehl Connectivity Solutions GmbH
Geschäftsführung: Horst Leonberger
Sitz der Gesellschaft: Nürnberg - Registergericht: Amtsgericht
Nürnberg: HRB 32315
___________________________________________________________________________________________________
Der Inhalt der vorstehenden E-Mail ist nicht rechtlich bindend. Diese E-Mail enthaelt vertrauliche und/oder rechtlich geschuetzte Informationen.
Informieren Sie uns bitte, wenn Sie diese E-Mail faelschlicherweise erhalten haben. Bitte loeschen Sie in diesem Fall die Nachricht.
Jede unerlaubte Form der Reproduktion, Bekanntgabe, Aenderung, Verteilung und/oder Publikation dieser E-Mail ist strengstens untersagt.
The contents of the above mentioned e-mail is not legally binding. This e-mail contains confidential and/or legally protected information. Please inform us if you have received this e-mail by
mistake and delete it in such a case. Each unauthorized reproduction, disclosure, alteration, distribution and/or publication of this e-mail is strictly prohibited.
next prev parent reply other threads:[~2018-09-25 6:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-15 11:43 [PATCH] " Alexandre Belloni
2018-09-25 6:46 ` Denis OSTERLAND [this message]
2018-09-25 7:47 ` Alexandre Belloni
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=1537857983.4657.5.camel@diehl.com \
--to=denis.osterland@diehl.com \
--cc=alexandre.belloni@bootlin.com \
--cc=khoroshilov@ispras.ru \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®