diff options
Diffstat (limited to 'drivers/media/video')
-rw-r--r-- | drivers/media/video/msp3400-driver.c | 14 | ||||
-rw-r--r-- | drivers/media/video/pvrusb2/pvrusb2-hdw.c | 6 | ||||
-rw-r--r-- | drivers/media/video/pvrusb2/pvrusb2-v4l2.c | 6 | ||||
-rw-r--r-- | drivers/media/video/saa7115.c | 2 | ||||
-rw-r--r-- | drivers/media/video/tuner-core.c | 10 |
5 files changed, 17 insertions, 21 deletions
diff --git a/drivers/media/video/msp3400-driver.c b/drivers/media/video/msp3400-driver.c index 2fb9fe6a1ae7..ba1af3c8525e 100644 --- a/drivers/media/video/msp3400-driver.c +++ b/drivers/media/video/msp3400-driver.c | |||
@@ -780,18 +780,16 @@ static int msp_command(struct i2c_client *client, unsigned int cmd, void *arg) | |||
780 | return 0; | 780 | return 0; |
781 | } | 781 | } |
782 | 782 | ||
783 | static int msp_suspend(struct device * dev, pm_message_t state) | 783 | static int msp_suspend(struct i2c_client *client, pm_message_t state) |
784 | { | 784 | { |
785 | struct i2c_client *client = container_of(dev, struct i2c_client, dev); | ||
786 | 785 | ||
787 | v4l_dbg(1, msp_debug, client, "suspend\n"); | 786 | v4l_dbg(1, msp_debug, client, "suspend\n"); |
788 | msp_reset(client); | 787 | msp_reset(client); |
789 | return 0; | 788 | return 0; |
790 | } | 789 | } |
791 | 790 | ||
792 | static int msp_resume(struct device * dev) | 791 | static int msp_resume(struct i2c_client *client) |
793 | { | 792 | { |
794 | struct i2c_client *client = container_of(dev, struct i2c_client, dev); | ||
795 | 793 | ||
796 | v4l_dbg(1, msp_debug, client, "resume\n"); | 794 | v4l_dbg(1, msp_debug, client, "resume\n"); |
797 | msp_wake_thread(client); | 795 | msp_wake_thread(client); |
@@ -825,7 +823,7 @@ static int msp_attach(struct i2c_adapter *adapter, int address, int kind) | |||
825 | if (msp_reset(client) == -1) { | 823 | if (msp_reset(client) == -1) { |
826 | v4l_dbg(1, msp_debug, client, "msp3400 not found\n"); | 824 | v4l_dbg(1, msp_debug, client, "msp3400 not found\n"); |
827 | kfree(client); | 825 | kfree(client); |
828 | return -1; | 826 | return 0; |
829 | } | 827 | } |
830 | 828 | ||
831 | state = kmalloc(sizeof(*state), GFP_KERNEL); | 829 | state = kmalloc(sizeof(*state), GFP_KERNEL); |
@@ -859,7 +857,7 @@ static int msp_attach(struct i2c_adapter *adapter, int address, int kind) | |||
859 | v4l_dbg(1, msp_debug, client, "not an msp3400 (cannot read chip version)\n"); | 857 | v4l_dbg(1, msp_debug, client, "not an msp3400 (cannot read chip version)\n"); |
860 | kfree(state); | 858 | kfree(state); |
861 | kfree(client); | 859 | kfree(client); |
862 | return -1; | 860 | return 0; |
863 | } | 861 | } |
864 | 862 | ||
865 | msp_set_audio(client); | 863 | msp_set_audio(client); |
@@ -996,11 +994,11 @@ static struct i2c_driver i2c_driver = { | |||
996 | .id = I2C_DRIVERID_MSP3400, | 994 | .id = I2C_DRIVERID_MSP3400, |
997 | .attach_adapter = msp_probe, | 995 | .attach_adapter = msp_probe, |
998 | .detach_client = msp_detach, | 996 | .detach_client = msp_detach, |
997 | .suspend = msp_suspend, | ||
998 | .resume = msp_resume, | ||
999 | .command = msp_command, | 999 | .command = msp_command, |
1000 | .driver = { | 1000 | .driver = { |
1001 | .name = "msp3400", | 1001 | .name = "msp3400", |
1002 | .suspend = msp_suspend, | ||
1003 | .resume = msp_resume, | ||
1004 | }, | 1002 | }, |
1005 | }; | 1003 | }; |
1006 | 1004 | ||
diff --git a/drivers/media/video/pvrusb2/pvrusb2-hdw.c b/drivers/media/video/pvrusb2/pvrusb2-hdw.c index 1ff5138e4bb6..9916cf32494d 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-hdw.c +++ b/drivers/media/video/pvrusb2/pvrusb2-hdw.c | |||
@@ -1248,10 +1248,10 @@ int pvr2_upload_firmware2(struct pvr2_hdw *hdw) | |||
1248 | ret |= pvr2_write_register(hdw, 0xaa18, 0x00840000); /*unknown*/ | 1248 | ret |= pvr2_write_register(hdw, 0xaa18, 0x00840000); /*unknown*/ |
1249 | LOCK_TAKE(hdw->ctl_lock); do { | 1249 | LOCK_TAKE(hdw->ctl_lock); do { |
1250 | hdw->cmd_buffer[0] = FX2CMD_FWPOST1; | 1250 | hdw->cmd_buffer[0] = FX2CMD_FWPOST1; |
1251 | ret |= pvr2_send_request(hdw,hdw->cmd_buffer,1,0,0); | 1251 | ret |= pvr2_send_request(hdw,hdw->cmd_buffer,1,NULL,0); |
1252 | hdw->cmd_buffer[0] = FX2CMD_MEMSEL; | 1252 | hdw->cmd_buffer[0] = FX2CMD_MEMSEL; |
1253 | hdw->cmd_buffer[1] = 0; | 1253 | hdw->cmd_buffer[1] = 0; |
1254 | ret |= pvr2_send_request(hdw,hdw->cmd_buffer,2,0,0); | 1254 | ret |= pvr2_send_request(hdw,hdw->cmd_buffer,2,NULL,0); |
1255 | } while (0); LOCK_GIVE(hdw->ctl_lock); | 1255 | } while (0); LOCK_GIVE(hdw->ctl_lock); |
1256 | 1256 | ||
1257 | if (ret) { | 1257 | if (ret) { |
@@ -1320,7 +1320,7 @@ int pvr2_upload_firmware2(struct pvr2_hdw *hdw) | |||
1320 | LOCK_TAKE(hdw->ctl_lock); do { | 1320 | LOCK_TAKE(hdw->ctl_lock); do { |
1321 | hdw->cmd_buffer[0] = FX2CMD_MEMSEL; | 1321 | hdw->cmd_buffer[0] = FX2CMD_MEMSEL; |
1322 | hdw->cmd_buffer[1] = 0; | 1322 | hdw->cmd_buffer[1] = 0; |
1323 | ret |= pvr2_send_request(hdw,hdw->cmd_buffer,2,0,0); | 1323 | ret |= pvr2_send_request(hdw,hdw->cmd_buffer,2,NULL,0); |
1324 | } while (0); LOCK_GIVE(hdw->ctl_lock); | 1324 | } while (0); LOCK_GIVE(hdw->ctl_lock); |
1325 | 1325 | ||
1326 | if (ret) { | 1326 | if (ret) { |
diff --git a/drivers/media/video/pvrusb2/pvrusb2-v4l2.c b/drivers/media/video/pvrusb2/pvrusb2-v4l2.c index 5313d342666e..25d3830b482a 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-v4l2.c +++ b/drivers/media/video/pvrusb2/pvrusb2-v4l2.c | |||
@@ -808,11 +808,11 @@ static void pvr2_v4l2_destroy_no_lock(struct pvr2_v4l2 *vp) | |||
808 | { | 808 | { |
809 | if (vp->dev_video) { | 809 | if (vp->dev_video) { |
810 | pvr2_v4l2_dev_destroy(vp->dev_video); | 810 | pvr2_v4l2_dev_destroy(vp->dev_video); |
811 | vp->dev_video = 0; | 811 | vp->dev_video = NULL; |
812 | } | 812 | } |
813 | if (vp->dev_radio) { | 813 | if (vp->dev_radio) { |
814 | pvr2_v4l2_dev_destroy(vp->dev_radio); | 814 | pvr2_v4l2_dev_destroy(vp->dev_radio); |
815 | vp->dev_radio = 0; | 815 | vp->dev_radio = NULL; |
816 | } | 816 | } |
817 | 817 | ||
818 | pvr2_trace(PVR2_TRACE_STRUCT,"Destroying pvr2_v4l2 id=%p",vp); | 818 | pvr2_trace(PVR2_TRACE_STRUCT,"Destroying pvr2_v4l2 id=%p",vp); |
@@ -1138,7 +1138,7 @@ static void pvr2_v4l2_dev_init(struct pvr2_v4l2_dev *dip, | |||
1138 | { | 1138 | { |
1139 | int mindevnum; | 1139 | int mindevnum; |
1140 | int unit_number; | 1140 | int unit_number; |
1141 | int *nr_ptr = 0; | 1141 | int *nr_ptr = NULL; |
1142 | dip->v4lp = vp; | 1142 | dip->v4lp = vp; |
1143 | 1143 | ||
1144 | 1144 | ||
diff --git a/drivers/media/video/saa7115.c b/drivers/media/video/saa7115.c index 7735b6758921..4d5bbd859de1 100644 --- a/drivers/media/video/saa7115.c +++ b/drivers/media/video/saa7115.c | |||
@@ -961,7 +961,7 @@ static void saa711x_set_v4lstd(struct i2c_client *client, v4l2_std_id std) | |||
961 | reg |= 0x10; | 961 | reg |= 0x10; |
962 | } else if (std == V4L2_STD_NTSC_M_JP) { | 962 | } else if (std == V4L2_STD_NTSC_M_JP) { |
963 | reg |= 0x40; | 963 | reg |= 0x40; |
964 | } else if (std == V4L2_STD_SECAM) { | 964 | } else if (std & V4L2_STD_SECAM) { |
965 | reg |= 0x50; | 965 | reg |= 0x50; |
966 | } | 966 | } |
967 | saa711x_write(client, R_0E_CHROMA_CNTL_1, reg); | 967 | saa711x_write(client, R_0E_CHROMA_CNTL_1, reg); |
diff --git a/drivers/media/video/tuner-core.c b/drivers/media/video/tuner-core.c index 7be73e3763de..15dbc6bf42a7 100644 --- a/drivers/media/video/tuner-core.c +++ b/drivers/media/video/tuner-core.c | |||
@@ -804,9 +804,8 @@ static int tuner_command(struct i2c_client *client, unsigned int cmd, void *arg) | |||
804 | return 0; | 804 | return 0; |
805 | } | 805 | } |
806 | 806 | ||
807 | static int tuner_suspend(struct device *dev, pm_message_t state) | 807 | static int tuner_suspend(struct i2c_client *c, pm_message_t state) |
808 | { | 808 | { |
809 | struct i2c_client *c = container_of (dev, struct i2c_client, dev); | ||
810 | struct tuner *t = i2c_get_clientdata (c); | 809 | struct tuner *t = i2c_get_clientdata (c); |
811 | 810 | ||
812 | tuner_dbg ("suspend\n"); | 811 | tuner_dbg ("suspend\n"); |
@@ -814,9 +813,8 @@ static int tuner_suspend(struct device *dev, pm_message_t state) | |||
814 | return 0; | 813 | return 0; |
815 | } | 814 | } |
816 | 815 | ||
817 | static int tuner_resume(struct device *dev) | 816 | static int tuner_resume(struct i2c_client *c) |
818 | { | 817 | { |
819 | struct i2c_client *c = container_of (dev, struct i2c_client, dev); | ||
820 | struct tuner *t = i2c_get_clientdata (c); | 818 | struct tuner *t = i2c_get_clientdata (c); |
821 | 819 | ||
822 | tuner_dbg ("resume\n"); | 820 | tuner_dbg ("resume\n"); |
@@ -837,10 +835,10 @@ static struct i2c_driver driver = { | |||
837 | .attach_adapter = tuner_probe, | 835 | .attach_adapter = tuner_probe, |
838 | .detach_client = tuner_detach, | 836 | .detach_client = tuner_detach, |
839 | .command = tuner_command, | 837 | .command = tuner_command, |
838 | .suspend = tuner_suspend, | ||
839 | .resume = tuner_resume, | ||
840 | .driver = { | 840 | .driver = { |
841 | .name = "tuner", | 841 | .name = "tuner", |
842 | .suspend = tuner_suspend, | ||
843 | .resume = tuner_resume, | ||
844 | }, | 842 | }, |
845 | }; | 843 | }; |
846 | static struct i2c_client client_template = { | 844 | static struct i2c_client client_template = { |