Mercurial > pt1.oyama
comparison driver/pt1_pci.c @ 111:c8cfd684fee8
re-enable set_sleepmode. backing out r109.
author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
---|---|
date | Fri, 19 Mar 2010 00:51:35 +0900 |
parents | 8a2a032bfa50 |
children | 4303bbfd5d37 |
comparison
equal
deleted
inserted
replaced
110:d89f0da0a7e4 | 111:c8cfd684fee8 |
---|---|
341 if(channel->minor == minor){ | 341 if(channel->minor == minor){ |
342 if(channel->valid == TRUE){ | 342 if(channel->valid == TRUE){ |
343 mutex_unlock(&device[lp]->lock); | 343 mutex_unlock(&device[lp]->lock); |
344 return -EIO ; | 344 return -EIO ; |
345 } | 345 } |
346 #if 0 | 346 |
347 /* wake tuner up */ | 347 /* wake tuner up */ |
348 set_sleepmode(channel->ptr->regs, &channel->lock, | 348 set_sleepmode(channel->ptr->regs, &channel->lock, |
349 channel->address, channel->type, | 349 channel->address, channel->type, |
350 TYPE_WAKEUP); | 350 TYPE_WAKEUP); |
351 schedule_timeout_interruptible(msecs_to_jiffies(50)); | 351 schedule_timeout_interruptible(msecs_to_jiffies(50)); |
352 #endif | 352 |
353 channel->drop = 0 ; | 353 channel->drop = 0 ; |
354 channel->valid = TRUE ; | 354 channel->valid = TRUE ; |
355 channel->overflow = 0 ; | 355 channel->overflow = 0 ; |
356 channel->counetererr = 0 ; | 356 channel->counetererr = 0 ; |
357 channel->transerr = 0 ; | 357 channel->transerr = 0 ; |
387 channel->req_dma = FALSE ; | 387 channel->req_dma = FALSE ; |
388 wake_up(&channel->ptr->dma_wait_q); | 388 wake_up(&channel->ptr->dma_wait_q); |
389 } | 389 } |
390 mutex_unlock(&channel->ptr->lock); | 390 mutex_unlock(&channel->ptr->lock); |
391 | 391 |
392 #if 0 | |
393 /* send tuner to sleep */ | 392 /* send tuner to sleep */ |
394 set_sleepmode(channel->ptr->regs, &channel->lock, | 393 set_sleepmode(channel->ptr->regs, &channel->lock, |
395 channel->address, channel->type, TYPE_SLEEP); | 394 channel->address, channel->type, TYPE_SLEEP); |
396 schedule_timeout_interruptible(msecs_to_jiffies(50)); | 395 schedule_timeout_interruptible(msecs_to_jiffies(50)); |
397 #endif | |
398 | 396 |
399 return 0; | 397 return 0; |
400 } | 398 } |
401 | 399 |
402 static ssize_t pt1_read(struct file *file, char __user *buf, size_t cnt, loff_t * ppos) | 400 static ssize_t pt1_read(struct file *file, char __user *buf, size_t cnt, loff_t * ppos) |
755 } | 753 } |
756 } | 754 } |
757 // 初期化完了 | 755 // 初期化完了 |
758 for(lp = 0 ; lp < MAX_CHANNEL ; lp++){ | 756 for(lp = 0 ; lp < MAX_CHANNEL ; lp++){ |
759 set_sleepmode(dev_conf->regs, &dev_conf->lock, | 757 set_sleepmode(dev_conf->regs, &dev_conf->lock, |
760 i2c_address[lp], channeltype[lp], TYPE_WAKEUP); | 758 i2c_address[lp], channeltype[lp], TYPE_SLEEP); |
761 | 759 |
762 schedule_timeout_interruptible(msecs_to_jiffies(50)); | 760 schedule_timeout_interruptible(msecs_to_jiffies(50)); |
763 } | 761 } |
764 rc = alloc_chrdev_region(&dev_conf->dev, 0, MAX_CHANNEL, DEV_NAME); | 762 rc = alloc_chrdev_region(&dev_conf->dev, 0, MAX_CHANNEL, DEV_NAME); |
765 if(rc < 0){ | 763 if(rc < 0){ |