diff options
Diffstat (limited to 'sound/oss/dmasound/tas3001c.c')
-rw-r--r-- | sound/oss/dmasound/tas3001c.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sound/oss/dmasound/tas3001c.c b/sound/oss/dmasound/tas3001c.c index f227c9f688cc..2f21a3c00374 100644 --- a/sound/oss/dmasound/tas3001c.c +++ b/sound/oss/dmasound/tas3001c.c | |||
@@ -50,6 +50,7 @@ struct tas3001c_data_t { | |||
50 | int output_id; | 50 | int output_id; |
51 | int speaker_id; | 51 | int speaker_id; |
52 | struct tas_drce_t drce_state; | 52 | struct tas_drce_t drce_state; |
53 | struct work_struct change; | ||
53 | }; | 54 | }; |
54 | 55 | ||
55 | 56 | ||
@@ -667,14 +668,13 @@ tas3001c_update_device_parameters(struct tas3001c_data_t *self) | |||
667 | } | 668 | } |
668 | 669 | ||
669 | static void | 670 | static void |
670 | tas3001c_device_change_handler(void *self) | 671 | tas3001c_device_change_handler(struct work_struct *work) |
671 | { | 672 | { |
672 | if (self) | 673 | struct tas3001c_data_t *self; |
673 | tas3001c_update_device_parameters(self); | 674 | self = container_of(work, struct tas3001c_data_t, change); |
675 | tas3001c_update_device_parameters(self); | ||
674 | } | 676 | } |
675 | 677 | ||
676 | static struct work_struct device_change; | ||
677 | |||
678 | static int | 678 | static int |
679 | tas3001c_output_device_change( struct tas3001c_data_t *self, | 679 | tas3001c_output_device_change( struct tas3001c_data_t *self, |
680 | int device_id, | 680 | int device_id, |
@@ -685,7 +685,7 @@ tas3001c_output_device_change( struct tas3001c_data_t *self, | |||
685 | self->output_id=output_id; | 685 | self->output_id=output_id; |
686 | self->speaker_id=speaker_id; | 686 | self->speaker_id=speaker_id; |
687 | 687 | ||
688 | schedule_work(&device_change); | 688 | schedule_work(&self->change); |
689 | return 0; | 689 | return 0; |
690 | } | 690 | } |
691 | 691 | ||
@@ -823,7 +823,7 @@ tas3001c_init(struct i2c_client *client) | |||
823 | tas3001c_write_biquad_shadow(self, i, j, | 823 | tas3001c_write_biquad_shadow(self, i, j, |
824 | &tas3001c_eq_unity); | 824 | &tas3001c_eq_unity); |
825 | 825 | ||
826 | INIT_WORK(&device_change, tas3001c_device_change_handler, self); | 826 | INIT_WORK(&self->change, tas3001c_device_change_handler); |
827 | return 0; | 827 | return 0; |
828 | } | 828 | } |
829 | 829 | ||