Re: [PATCH 5/6] GenWQE Sysfs interfaces

From: Greg KH
Date: Wed Nov 27 2013 - 14:22:16 EST


On Wed, Nov 06, 2013 at 01:45:42PM +0100, Frank Haverkamp wrote:
> +/**
> + * genwqe_init_sysfs() - Setup sysfs entries of the card device
> + */
> +int genwqe_init_sysfs(struct genwqe_dev *cd)
> +{
> + int rc;
> +
> + rc = sysfs_create_group(&cd->dev->kobj, &genwqe_attribute_group);
> + if (rc)
> + return -ENXIO;
> +
> + return 0;
> +}

Why isn't this group the "default" one for the device? That way you
don't have to explicitly create/remove it, the driver core handles it
all automatically for you, and you don't race with userspace when it is
created/announced.

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/