Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 171008 Details for
Bug 210889
New package: asus-oled (new ebuild)
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to make the compilation work with >=2.6.27 kernels
asus_oled-0.03-gentoo.patch (text/plain), 4.55 KB, created by
Gonçalo Silva
on 2008-11-07 17:23:17 UTC
(
hide
)
Description:
Patch to make the compilation work with >=2.6.27 kernels
Filename:
MIME Type:
Creator:
Gonçalo Silva
Created:
2008-11-07 17:23:17 UTC
Size:
4.55 KB
patch
obsolete
>diff -urN orig/asus_oled-0.03/asus_oled work/asus_oled-0.03/asus_oled >--- orig/asus_oled-0.03/asus_oled 2008-01-30 08:49:24.000000000 +0100 >+++ work/asus_oled-0.03/asus_oled 2008-07-26 20:18:48.000000000 +0200 >@@ -116,7 +116,7 @@ > size_t buf_size; > char *buf; > uint8_t enabled; >- struct class_device *class_dev; >+ struct device *dev; > }; > > static void enable_oled(struct asus_oled_dev *odev, uint8_t enabl) >@@ -166,9 +166,9 @@ > return count; > } > >-static ssize_t class_set_enabled(struct class_device *class_device, const char *buf, size_t count) >+static ssize_t class_set_enabled(struct device *device, struct device_attribute *attr, const char *buf, size_t count) > { >- struct asus_oled_dev *odev = (struct asus_oled_dev *) class_get_devdata(class_device); >+ struct asus_oled_dev *odev = (struct asus_oled_dev *) dev_get_drvdata(device); > > int temp = simple_strtoul(buf, NULL, 10); > >@@ -185,9 +185,9 @@ > return sprintf(buf, "%d\n", odev->enabled); > } > >-static ssize_t class_get_enabled(struct class_device *class_device, char *buf) >+static ssize_t class_get_enabled(struct device *device, struct device_attribute *attr, char *buf) > { >- struct asus_oled_dev *odev = (struct asus_oled_dev *) class_get_devdata(class_device); >+ struct asus_oled_dev *odev = (struct asus_oled_dev *) dev_get_drvdata(device); > > return sprintf(buf, "%d\n", odev->enabled); > } >@@ -426,9 +426,9 @@ > return odev_set_picture(usb_get_intfdata(intf), buf, count); > } > >-static ssize_t class_set_picture(struct class_device *class_device, const char *buf, size_t count) >+static ssize_t class_set_picture(struct device *device, struct device_attribute *attr, const char *buf, size_t count) > { >- return odev_set_picture((struct asus_oled_dev *) class_get_devdata(class_device), buf, count); >+ return odev_set_picture((struct asus_oled_dev *) dev_get_drvdata(device), buf, count); > } > > #define ASUS_OLED_DEVICE_ATTR(_file) dev_attr_asus_oled_##_file >@@ -436,8 +436,8 @@ > static DEVICE_ATTR(asus_oled_enabled, S_IWUGO | S_IRUGO, get_enabled, set_enabled); > static DEVICE_ATTR(asus_oled_picture, S_IWUGO , NULL, set_picture); > >-static CLASS_DEVICE_ATTR (enabled, S_IWUGO | S_IRUGO, class_get_enabled, class_set_enabled); >-static CLASS_DEVICE_ATTR (picture, S_IWUGO, NULL, class_set_picture); >+static DEVICE_ATTR(enabled, S_IWUGO | S_IRUGO, class_get_enabled, class_set_enabled); >+static DEVICE_ATTR(picture, S_IWUGO, NULL, class_set_picture); > > static int asus_oled_probe(struct usb_interface *interface, const struct usb_device_id *id) > { >@@ -463,7 +463,7 @@ > odev->last_val = 0; > odev->buf = NULL; > odev->enabled = 1; >- odev->class_dev = 0; >+ odev->dev = 0; > > usb_set_intfdata (interface, odev); > >@@ -475,21 +475,21 @@ > goto err_files; > } > >- odev->class_dev = class_device_create(oled_class, NULL, MKDEV(0,0), >- &interface->dev, "oled_%d", ++oled_num); >+ odev->dev = device_create_drvdata(oled_class, &interface->dev, MKDEV(0,0), >+ NULL,"oled_%d", ++oled_num); > >- if (IS_ERR(odev->class_dev)) { >- retval = PTR_ERR(odev->class_dev); >+ if (IS_ERR(odev->dev)) { >+ retval = PTR_ERR(odev->dev); > goto err_files; > } > >- class_set_devdata(odev->class_dev, odev); >+ dev_set_drvdata(odev->dev, odev); > >- if ( (retval = class_device_create_file(odev->class_dev, &class_device_attr_enabled))) { >+ if ( (retval = device_create_file(odev->dev, &dev_attr_enabled))) { > goto err_class_enabled; > } > >- if ( (retval = class_device_create_file(odev->class_dev, &class_device_attr_picture))) { >+ if ( (retval = device_create_file(odev->dev, &dev_attr_picture))) { > goto err_class_picture; > } > >@@ -501,11 +501,11 @@ > return 0; > > err_class_picture: >- class_device_remove_file(odev->class_dev, &class_device_attr_picture); >+ device_remove_file(odev->dev, &dev_attr_picture); > > err_class_enabled: >- class_device_remove_file(odev->class_dev, &class_device_attr_enabled); >- class_device_unregister(odev->class_dev); >+ device_remove_file(odev->dev, &dev_attr_enabled); >+ device_unregister(odev->dev); > > err_files: > device_remove_file(&interface->dev, &ASUS_OLED_DEVICE_ATTR(enabled)); >@@ -525,9 +525,9 @@ > odev = usb_get_intfdata (interface); > usb_set_intfdata (interface, NULL); > >- class_device_remove_file(odev->class_dev, &class_device_attr_picture); >- class_device_remove_file(odev->class_dev, &class_device_attr_enabled); >- class_device_unregister(odev->class_dev); >+ device_remove_file(odev->dev, &dev_attr_picture); >+ device_remove_file(odev->dev, &dev_attr_enabled); >+ device_unregister(odev->dev); > > device_remove_file(&interface->dev, & ASUS_OLED_DEVICE_ATTR(picture)); > device_remove_file(&interface->dev, & ASUS_OLED_DEVICE_ATTR(enabled)); >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 210889
:
144122
|
144124
|
144126
|
171008
|
171015
|
171016