diff options
Diffstat (limited to 'media-libs/svgalib/files')
-rw-r--r-- | media-libs/svgalib/files/svgalib-1.9.25-linux2.6.patch | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/media-libs/svgalib/files/svgalib-1.9.25-linux2.6.patch b/media-libs/svgalib/files/svgalib-1.9.25-linux2.6.patch index ae3617da0f7c..8475d3ae0f89 100644 --- a/media-libs/svgalib/files/svgalib-1.9.25-linux2.6.patch +++ b/media-libs/svgalib/files/svgalib-1.9.25-linux2.6.patch @@ -82,6 +82,36 @@ } #endif +@@ -105,7 +109,8 @@ + class_device_create(svgalib_helper_class, \ + MKDEV(SVGALIB_HELPER_MAJOR, _minor), \ + &sh_pci_devs[_minor]->dev->dev, _name); +-#else /* 2.6.15 changed class_device_create */ ++/* 2.6.15 changed class_device_create */ ++#elif LINUX_VERSION_CODE < KERNEL_VERSION(2,6,26) + # define SLH_SYSFS_ADD_CONTROL \ + class_device_create(svgalib_helper_class, NULL, \ + MKDEV(SVGALIB_HELPER_MAJOR, 0), \ +@@ -115,7 +120,18 @@ + class_device_create(svgalib_helper_class, NULL, \ + MKDEV(SVGALIB_HELPER_MAJOR, _minor), \ + &sh_pci_devs[_minor]->dev->dev, _name); +-#endif /* 2.6.15 */ ++/* 2.6.26 changed class_device_create to device_create */ ++#else ++# define SLH_SYSFS_ADD_CONTROL \ ++ device_create(svgalib_helper_class, NULL, \ ++ MKDEV(SVGALIB_HELPER_MAJOR, 0), \ ++ "svga"); ++ ++# define SLH_SYSFS_ADD_DEVICE(_name, _minor) \ ++ device_create(svgalib_helper_class, &sh_pci_devs[_minor]->dev->dev, \ ++ MKDEV(SVGALIB_HELPER_MAJOR, _minor), \ ++ _name); ++#endif + + # define SLH_SYSFS_REMOVE_DEVICE(i) \ + class_destroy(svgalib_helper_class); @@ -167,3 +167,7 @@ #ifndef PCI_VENDOR_ID_RENDITION #define PCI_VENDOR_ID_RENDITION 0x1163 |