Re: [RFC]: add sysfs support to parport_pc, v3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Greg KH <[email protected]>
> +++ /usr/src/linux-2.6.14/drivers/parport/parport_pc.c	2006-01-01
> 11:29:05.000000000 -0600

Line wrapped so it can't be applied :(

> + * Added sysfs and udev - Jason Dravet <[email protected]>
>  */

Doesn't belong here, this goes in the change log.
My mistake.

> +#include <linux/sysfs.h>

Your email client also ate the leading spaces :(
My email client is hotmail. I have come to realize how much hotmail sucks for email. It eats the leading spaces, converts tabs to spaces, and line wraps. I will work on getting a new mail account.

> +	class_device_create(parallel_class, NULL, MKDEV(6, countports),
> NULL, "lp%i", countports);
> +	class_device_create(parallel_class, NULL, MKDEV(99, countports),
> NULL, "parport%i", countports);
> +	countports++;

What does the 6 and 99 come from? Aren't these #defined in a header file somewhere?
Good question. The answer is I have no idea. I booted Fedora Core and I did a ls -l /dev and wrote down the specs for lp0 and parport0. lp0 looked like crw-rw---- root lp 6, 0 date lp0 so that is what I used. After reading Linux Device Drivers I found out that 6 is the major number and 0 is the minor number. The goal was to make sure that the nodes generated by my patch were the same as the nodes generated before my patch so I used those numbers. Should I have used different major numbers?

Thanks,
Jason


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux