Re: [PATCH] RFC: Attributes in /sys/cdev

From: Greg KH
Date: Fri Sep 19 2003 - 18:33:00 EST


On Fri, Sep 19, 2003 at 05:10:46PM -0600, Jonathan Corbet wrote:
> +static ssize_t cdev_dev_read(struct cdev *cd, char *page)
> +{
> + return sprintf(page, "%d:%d\n", MAJOR(cd->firstdev),
> + MINOR(cd->firstdev));
> +}

You should use the print_dev_t() call here instead of doing it by hand.

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/