mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
WorkQueue: Fix up arch-specific work items where possible
Fix up arch-specific work items where possible to use the new work_struct and delayed_work structs. Three places that enqueue bits of their stack and then return have been marked with #error as this is not permitted. Signed-Off-By: David Howells <[email protected]>
This commit is contained in:
parent
9db7372445
commit
6d5aefb8ea
34 changed files with 154 additions and 121 deletions
|
|
@ -68,7 +68,7 @@ struct usb_hub {
|
|||
|
||||
unsigned has_indicators:1;
|
||||
u8 indicator[USB_MAXCHILDREN];
|
||||
struct work_struct leds;
|
||||
struct delayed_work leds;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ struct appledisplay {
|
|||
char *urbdata; /* interrupt URB data buffer */
|
||||
char *msgdata; /* control message data buffer */
|
||||
|
||||
struct work_struct work;
|
||||
struct delayed_work work;
|
||||
int button_pressed;
|
||||
spinlock_t lock;
|
||||
};
|
||||
|
|
@ -117,7 +117,7 @@ static void appledisplay_complete(struct urb *urb)
|
|||
case ACD_BTN_BRIGHT_UP:
|
||||
case ACD_BTN_BRIGHT_DOWN:
|
||||
pdata->button_pressed = 1;
|
||||
queue_work(wq, &pdata->work);
|
||||
queue_delayed_work(wq, &pdata->work, 0);
|
||||
break;
|
||||
case ACD_BTN_NONE:
|
||||
default:
|
||||
|
|
@ -184,9 +184,10 @@ static struct backlight_properties appledisplay_bl_data = {
|
|||
.max_brightness = 0xFF
|
||||
};
|
||||
|
||||
static void appledisplay_work(void *private)
|
||||
static void appledisplay_work(struct work_struct *work)
|
||||
{
|
||||
struct appledisplay *pdata = private;
|
||||
struct appledisplay *pdata =
|
||||
container_of(work, struct appledisplay, work.work);
|
||||
int retval;
|
||||
|
||||
up(&pdata->bd->sem);
|
||||
|
|
@ -238,7 +239,7 @@ static int appledisplay_probe(struct usb_interface *iface,
|
|||
pdata->udev = udev;
|
||||
|
||||
spin_lock_init(&pdata->lock);
|
||||
INIT_WORK(&pdata->work, appledisplay_work, pdata);
|
||||
INIT_DELAYED_WORK(&pdata->work, appledisplay_work);
|
||||
|
||||
/* Allocate buffer for control messages */
|
||||
pdata->msgdata = kmalloc(ACD_MSG_BUFFER_LEN, GFP_KERNEL);
|
||||
|
|
|
|||
Loading…
Reference in a new issue