Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 143800
b: refs/heads/master
c: aa0b8f3
h: refs/heads/master
v: v3
  • Loading branch information
Helge Deller authored and Linus Torvalds committed Apr 21, 2009
1 parent 8063c5f commit 4caa118
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e638c1394010859a015a3b533ee452d768e62cea
refs/heads/master: aa0b8f3687f06ac0e5a2b24547fdf431e923c475
24 changes: 23 additions & 1 deletion trunk/drivers/input/serio/hp_sdc.c
Original file line number Diff line number Diff line change
Expand Up @@ -819,6 +819,7 @@ static const struct parisc_device_id hp_sdc_tbl[] = {
MODULE_DEVICE_TABLE(parisc, hp_sdc_tbl);

static int __init hp_sdc_init_hppa(struct parisc_device *d);
static struct delayed_work moduleloader_work;

static struct parisc_driver hp_sdc_driver = {
.name = "hp_sdc",
Expand Down Expand Up @@ -930,8 +931,15 @@ static int __init hp_sdc_init(void)

#if defined(__hppa__)

static void request_module_delayed(struct work_struct *work)
{
request_module("hp_sdc_mlc");
}

static int __init hp_sdc_init_hppa(struct parisc_device *d)
{
int ret;

if (!d)
return 1;
if (hp_sdc.dev != NULL)
Expand All @@ -944,13 +952,26 @@ static int __init hp_sdc_init_hppa(struct parisc_device *d)
hp_sdc.data_io = d->hpa.start + 0x800;
hp_sdc.status_io = d->hpa.start + 0x801;

return hp_sdc_init();
INIT_DELAYED_WORK(&moduleloader_work, request_module_delayed);

ret = hp_sdc_init();
/* after sucessfull initialization give SDC some time to settle
* and then load the hp_sdc_mlc upper layer driver */
if (!ret)
schedule_delayed_work(&moduleloader_work,
msecs_to_jiffies(2000));

return ret;
}

#endif /* __hppa__ */

static void hp_sdc_exit(void)
{
/* do nothing if we don't have a SDC */
if (!hp_sdc.dev)
return;

write_lock_irq(&hp_sdc.lock);

/* Turn off all maskable "sub-function" irq's. */
Expand All @@ -969,6 +990,7 @@ static void hp_sdc_exit(void)
tasklet_kill(&hp_sdc.task);

#if defined(__hppa__)
cancel_delayed_work_sync(&moduleloader_work);
if (unregister_parisc_driver(&hp_sdc_driver))
printk(KERN_WARNING PREFIX "Error unregistering HP SDC");
#endif
Expand Down

0 comments on commit 4caa118

Please sign in to comment.