lkml.org 
[lkml]   [2008]   [Mar]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/7] LinuxPPS core support.
On Thu, Mar 6, 2008 at 1:09 PM, Rodolfo Giometti <giometti@linux.it> wrote:
> This patch adds the kernel side of the PPS support currently named
> "LinuxPPS".

> diff --git a/drivers/pps/sysfs.c b/drivers/pps/sysfs.c
> new file mode 100644
> index 0000000..c25c91c
> --- /dev/null
> +++ b/drivers/pps/sysfs.c
> @@ -0,0 +1,130 @@

> +void pps_sysfs_remove_source_entry(struct pps_device *pps)
> +{
> + /* Delete info files */
> + sysfs_remove_group(&pps->dev->kobj, &pps_group);
> +}
> +
> +int pps_sysfs_create_source_entry(struct pps_device *pps)
> +{
> + int ret;
> +
> + /* Create info files */
> + ret = sysfs_create_group(&pps->dev->kobj, &pps_group);

Any specific reason you are creating the group by hand, and not assign
it to the default group in your class? It would will let the core
handle it for you. The device add uevent to userspace will happen
before you added the attributes, which is usually not nice.

Kay


\
 
 \ /
  Last update: 2008-03-21 04:39    [W:0.176 / U:0.700 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site