mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Bryan Wu <bryan.wu@canonical.com>
Cc: ccross@android.com, hmh@hmh.eng.br, rpurdie@rpsys.net,
	linux-kernel@vger.kernel.org, linux-leds@vger.kernel.org
Subject: Re: [PATCH 1/3] sysfs: introduce a sysfs_create_file_uevent new API
Date: Fri, 27 Jul 2012 08:52:08 -0700	[thread overview]
Message-ID: <20120727155208.GB535@kroah.com> (raw)
In-Reply-To: <1343361763-10307-2-git-send-email-bryan.wu@canonical.com>

On Fri, Jul 27, 2012 at 12:02:41PM +0800, Bryan Wu wrote:
> Send a uevent notification whenever a new sysfs file is created to allow
> userspace processes such as udev to modify permissions on the new files.

This makes no sense, why not just call kobject_uevent after creating the
file when needed?  Wrapping it up in a single function call doesn't add
any benefit that I can see, can you?

> 
> This new API function helps to do this.
> 
> Signed-off-by: Bryan Wu <bryan.wu@canonical.com>
> ---
>  fs/sysfs/file.c       | 28 ++++++++++++++++++++++++++++
>  include/linux/sysfs.h | 13 +++++++++++++
>  2 files changed, 41 insertions(+)
> 
> diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c
> index 00012e3..5a22d13 100644
> --- a/fs/sysfs/file.c
> +++ b/fs/sysfs/file.c
> @@ -576,6 +576,34 @@ int sysfs_create_file(struct kobject * kobj, const struct attribute * attr)
>  
>  }
>  
> +/**
> + *	sysfs_create_file_uevent - create an attribute file for an object
> +					and send a uevent to userspace.

kerneldoc needs to be on one line for function names, right?

greg k-h

  reply	other threads:[~2012-07-27 15:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-27  4:02 [PATCH 0/3] add new API to sysfs and device core code Bryan Wu
2012-07-27  4:02 ` [PATCH 1/3] sysfs: introduce a sysfs_create_file_uevent new API Bryan Wu
2012-07-27 15:52   ` Greg KH [this message]
2012-07-28 15:18     ` Bryan Wu
2012-07-27  4:02 ` [PATCH 2/3] drivers: add a new device_create_file_uevent API Bryan Wu
2012-07-27  4:02 ` [PATCH 3/3] ledtrig-timer: convert to use " Bryan Wu
2012-07-27 15:50 ` [PATCH 0/3] add new API to sysfs and device core code Greg KH
2012-07-27 19:38   ` Colin Cross

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=20120727155208.GB535@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=bryan.wu@canonical.com \
    --cc=ccross@android.com \
    --cc=hmh@hmh.eng.br \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=rpurdie@rpsys.net \
    /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

Powered by JetHome