diff options
Diffstat (limited to 'drivers/macintosh/mediabay.c')
-rw-r--r-- | drivers/macintosh/mediabay.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/drivers/macintosh/mediabay.c b/drivers/macintosh/mediabay.c index 48d647abea46..192bef5c20b3 100644 --- a/drivers/macintosh/mediabay.c +++ b/drivers/macintosh/mediabay.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/stddef.h> | 20 | #include <linux/stddef.h> |
21 | #include <linux/init.h> | 21 | #include <linux/init.h> |
22 | #include <linux/ide.h> | 22 | #include <linux/ide.h> |
23 | #include <linux/kthread.h> | ||
23 | #include <asm/prom.h> | 24 | #include <asm/prom.h> |
24 | #include <asm/pgtable.h> | 25 | #include <asm/pgtable.h> |
25 | #include <asm/io.h> | 26 | #include <asm/io.h> |
@@ -35,7 +36,6 @@ | |||
35 | 36 | ||
36 | 37 | ||
37 | #define MB_DEBUG | 38 | #define MB_DEBUG |
38 | #define MB_IGNORE_SIGNALS | ||
39 | 39 | ||
40 | #ifdef MB_DEBUG | 40 | #ifdef MB_DEBUG |
41 | #define MBDBG(fmt, arg...) printk(KERN_INFO fmt , ## arg) | 41 | #define MBDBG(fmt, arg...) printk(KERN_INFO fmt , ## arg) |
@@ -622,12 +622,7 @@ static int media_bay_task(void *x) | |||
622 | { | 622 | { |
623 | int i; | 623 | int i; |
624 | 624 | ||
625 | strcpy(current->comm, "media-bay"); | 625 | while (!kthread_should_stop()) { |
626 | #ifdef MB_IGNORE_SIGNALS | ||
627 | sigfillset(¤t->blocked); | ||
628 | #endif | ||
629 | |||
630 | for (;;) { | ||
631 | for (i = 0; i < media_bay_count; ++i) { | 626 | for (i = 0; i < media_bay_count; ++i) { |
632 | down(&media_bays[i].lock); | 627 | down(&media_bays[i].lock); |
633 | if (!media_bays[i].sleeping) | 628 | if (!media_bays[i].sleeping) |
@@ -636,9 +631,8 @@ static int media_bay_task(void *x) | |||
636 | } | 631 | } |
637 | 632 | ||
638 | msleep_interruptible(MB_POLL_DELAY); | 633 | msleep_interruptible(MB_POLL_DELAY); |
639 | if (signal_pending(current)) | ||
640 | return 0; | ||
641 | } | 634 | } |
635 | return 0; | ||
642 | } | 636 | } |
643 | 637 | ||
644 | static int __devinit media_bay_attach(struct macio_dev *mdev, const struct of_device_id *match) | 638 | static int __devinit media_bay_attach(struct macio_dev *mdev, const struct of_device_id *match) |
@@ -699,7 +693,7 @@ static int __devinit media_bay_attach(struct macio_dev *mdev, const struct of_de | |||
699 | 693 | ||
700 | /* Startup kernel thread */ | 694 | /* Startup kernel thread */ |
701 | if (i == 0) | 695 | if (i == 0) |
702 | kernel_thread(media_bay_task, NULL, CLONE_KERNEL); | 696 | kthread_run(media_bay_task, NULL, "media-bay"); |
703 | 697 | ||
704 | return 0; | 698 | return 0; |
705 | 699 | ||