OLD | NEW |
(Empty) | |
| 1 #ifndef _COMPAT_PCMCIA_DS_H |
| 2 #define _COMPAT_PCMCIA_DS_H |
| 3 #include <linux/version.h> |
| 4 |
| 5 #include_next <pcmcia/ds.h> |
| 6 |
| 7 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36) |
| 8 /** |
| 9 * pcmcia_read_config_byte() - read a byte from a card configuration register |
| 10 * |
| 11 * pcmcia_read_config_byte() reads a byte from a configuration register in |
| 12 * attribute memory. |
| 13 */ |
| 14 static inline int pcmcia_read_config_byte(struct pcmcia_device *p_dev, off_t whe
re, u8 *val) |
| 15 { |
| 16 int ret; |
| 17 conf_reg_t reg = { 0, CS_READ, where, 0 }; |
| 18 ret = pcmcia_access_configuration_register(p_dev, ®); |
| 19 *val = reg.Value; |
| 20 return ret; |
| 21 } |
| 22 |
| 23 /** |
| 24 * pcmcia_write_config_byte() - write a byte to a card configuration register |
| 25 * |
| 26 * pcmcia_write_config_byte() writes a byte to a configuration register in |
| 27 * attribute memory. |
| 28 */ |
| 29 static inline int pcmcia_write_config_byte(struct pcmcia_device *p_dev, off_t wh
ere, u8 val) |
| 30 { |
| 31 conf_reg_t reg = { 0, CS_WRITE, where, val }; |
| 32 return pcmcia_access_configuration_register(p_dev, ®); |
| 33 } |
| 34 #endif /* LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36) */ |
| 35 |
| 36 #endif |
OLD | NEW |