diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/media/saa7146.h | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/include/media/saa7146.h b/include/media/saa7146.h index afa5ff6469b3..796bcf151a3a 100644 --- a/include/media/saa7146.h +++ b/include/media/saa7146.h | |||
@@ -42,20 +42,6 @@ extern unsigned int saa7146_debug; | |||
42 | #define DEB_INT(x) if (0!=(DEBUG_VARIABLE&0x20)) { DEBUG_PROLOG; printk x; } /* interrupt debug messages */ | 42 | #define DEB_INT(x) if (0!=(DEBUG_VARIABLE&0x20)) { DEBUG_PROLOG; printk x; } /* interrupt debug messages */ |
43 | #define DEB_CAP(x) if (0!=(DEBUG_VARIABLE&0x40)) { DEBUG_PROLOG; printk x; } /* capture debug messages */ | 43 | #define DEB_CAP(x) if (0!=(DEBUG_VARIABLE&0x40)) { DEBUG_PROLOG; printk x; } /* capture debug messages */ |
44 | 44 | ||
45 | #define SAA7146_IER_DISABLE(x,y) \ | ||
46 | do { \ | ||
47 | unsigned int flags; \ | ||
48 | spin_lock_irqsave(&x->int_slock, flags); \ | ||
49 | saa7146_write(x, IER, saa7146_read(x, IER) & ~(y)); \ | ||
50 | spin_unlock_irqrestore(&x->int_slock, flags); \ | ||
51 | } while(0) | ||
52 | #define SAA7146_IER_ENABLE(x,y) \ | ||
53 | do { \ | ||
54 | unsigned int flags; \ | ||
55 | spin_lock_irqsave(&x->int_slock, flags); \ | ||
56 | saa7146_write(x, IER, saa7146_read(x, IER) | (y)); \ | ||
57 | spin_unlock_irqrestore(&x->int_slock, flags); \ | ||
58 | } while(0) | ||
59 | #define SAA7146_ISR_CLEAR(x,y) \ | 45 | #define SAA7146_ISR_CLEAR(x,y) \ |
60 | saa7146_write(x, ISR, (y)); | 46 | saa7146_write(x, ISR, (y)); |
61 | 47 | ||
@@ -451,4 +437,20 @@ int saa7146_wait_for_debi_done(struct saa7146_dev *dev, int nobusyloop); | |||
451 | #define SAA7146_I2C_BUS_BIT_RATE_80 (0x200) | 437 | #define SAA7146_I2C_BUS_BIT_RATE_80 (0x200) |
452 | #define SAA7146_I2C_BUS_BIT_RATE_60 (0x300) | 438 | #define SAA7146_I2C_BUS_BIT_RATE_60 (0x300) |
453 | 439 | ||
440 | static inline void SAA7146_IER_DISABLE(struct saa7146_dev *x, unsigned y) | ||
441 | { | ||
442 | unsigned long flags; | ||
443 | spin_lock_irqsave(&x->int_slock, flags); | ||
444 | saa7146_write(x, IER, saa7146_read(x, IER) & ~y); | ||
445 | spin_unlock_irqrestore(&x->int_slock, flags); | ||
446 | } | ||
447 | |||
448 | static inline void SAA7146_IER_ENABLE(struct saa7146_dev *x, unsigned y) | ||
449 | { | ||
450 | unsigned long flags; | ||
451 | spin_lock_irqsave(&x->int_slock, flags); | ||
452 | saa7146_write(x, IER, saa7146_read(x, IER) | y); | ||
453 | spin_unlock_irqrestore(&x->int_slock, flags); | ||
454 | } | ||
455 | |||
454 | #endif | 456 | #endif |