|
Lines 84-89
Link Here
|
| 84 |
# define SLH_SYSFS_REGISTER \ |
84 |
# define SLH_SYSFS_REGISTER \ |
| 85 |
svgalib_helper_class = class_create(THIS_MODULE, "svgalib_helper"); |
85 |
svgalib_helper_class = class_create(THIS_MODULE, "svgalib_helper"); |
| 86 |
|
86 |
|
|
|
87 |
|
| 88 |
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15) |
| 89 |
|
| 90 |
# define SLH_SYSFS_ADD_CONTROL \ |
| 91 |
class_device_create(svgalib_helper_class, NULL, \ |
| 92 |
MKDEV(SVGALIB_HELPER_MAJOR, 0), \ |
| 93 |
NULL, "svga"); |
| 94 |
|
| 95 |
# define SLH_SYSFS_ADD_DEVICE(_name, _minor) \ |
| 96 |
class_device_create(svgalib_helper_class, NULL, \ |
| 97 |
MKDEV(SVGALIB_HELPER_MAJOR, _minor), \ |
| 98 |
&sh_pci_devs[_minor]->dev->dev, _name); |
| 99 |
#else |
| 100 |
|
| 101 |
|
| 87 |
# define SLH_SYSFS_ADD_CONTROL \ |
102 |
# define SLH_SYSFS_ADD_CONTROL \ |
| 88 |
class_device_create(svgalib_helper_class, \ |
103 |
class_device_create(svgalib_helper_class, \ |
| 89 |
MKDEV(SVGALIB_HELPER_MAJOR, 0), \ |
104 |
MKDEV(SVGALIB_HELPER_MAJOR, 0), \ |
|
Lines 93-98
Link Here
|
| 93 |
class_device_create(svgalib_helper_class, \ |
108 |
class_device_create(svgalib_helper_class, \ |
| 94 |
MKDEV(SVGALIB_HELPER_MAJOR, _minor), \ |
109 |
MKDEV(SVGALIB_HELPER_MAJOR, _minor), \ |
| 95 |
&sh_pci_devs[_minor]->dev->dev, _name); |
110 |
&sh_pci_devs[_minor]->dev->dev, _name); |
|
|
111 |
#endif |
| 112 |
|
| 96 |
|
113 |
|
| 97 |
# define SLH_SYSFS_REMOVE_DEVICE(i) \ |
114 |
# define SLH_SYSFS_REMOVE_DEVICE(i) \ |
| 98 |
class_destroy(svgalib_helper_class); |
115 |
class_destroy(svgalib_helper_class); |