aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/pvrusb2/pvrusb2-i2c-core.c')
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-i2c-core.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c b/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c
index 62a7cfca837d..35a06652a60c 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c
@@ -590,6 +590,27 @@ static int handler_check(struct pvr2_i2c_client *cp)
590 590
591#define BUFSIZE 500 591#define BUFSIZE 500
592 592
593
594void pvr2_i2c_core_status_poll(struct pvr2_hdw *hdw)
595{
596 struct list_head *item;
597 struct pvr2_i2c_client *cp;
598 mutex_lock(&hdw->i2c_list_lock); do {
599 struct v4l2_tuner *vtp = &hdw->tuner_signal_info;
600 memset(vtp,0,sizeof(vtp));
601 list_for_each(item,&hdw->i2c_clients) {
602 cp = list_entry(item,struct pvr2_i2c_client,list);
603 if (!cp->detected_flag) continue;
604 if (!cp->status_poll) continue;
605 cp->status_poll(cp);
606 }
607 hdw->tuner_signal_stale = 0;
608 } while (0); mutex_unlock(&hdw->i2c_list_lock);
609}
610
611
612/* Issue various I2C operations to bring chip-level drivers into sync with
613 state stored in this driver. */
593void pvr2_i2c_core_sync(struct pvr2_hdw *hdw) 614void pvr2_i2c_core_sync(struct pvr2_hdw *hdw)
594{ 615{
595 unsigned long msk; 616 unsigned long msk;
@@ -876,6 +897,7 @@ static int pvr2_i2c_attach_inform(struct i2c_client *client)
876 client->addr,cp); 897 client->addr,cp);
877 if (!cp) return -ENOMEM; 898 if (!cp) return -ENOMEM;
878 memset(cp,0,sizeof(*cp)); 899 memset(cp,0,sizeof(*cp));
900 cp->hdw = hdw;
879 INIT_LIST_HEAD(&cp->list); 901 INIT_LIST_HEAD(&cp->list);
880 cp->client = client; 902 cp->client = client;
881 mutex_lock(&hdw->i2c_list_lock); do { 903 mutex_lock(&hdw->i2c_list_lock); do {