diff options
Diffstat (limited to 'drivers/staging/rts5208/rtsx.h')
-rw-r--r-- | drivers/staging/rts5208/rtsx.h | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/drivers/staging/rts5208/rtsx.h b/drivers/staging/rts5208/rtsx.h index 1396263..e725b10 100644 --- a/drivers/staging/rts5208/rtsx.h +++ b/drivers/staging/rts5208/rtsx.h @@ -70,14 +70,13 @@ #define rtsx_write_config_byte(chip, where, val) \ pci_write_config_byte((chip)->rtsx->pci, where, val) -#define wait_timeout_x(task_state, msecs) \ -do { \ - set_current_state((task_state)); \ - schedule_timeout((msecs) * HZ / 1000); \ +#define wait_timeout_x(task_state, msecs) \ +do { \ + set_current_state((task_state)); \ + schedule_timeout((msecs) * HZ / 1000); \ } while (0) #define wait_timeout(msecs) wait_timeout_x(TASK_INTERRUPTIBLE, (msecs)) - #define STATE_TRANS_NONE 0 #define STATE_TRANS_CMD 1 #define STATE_TRANS_BUF 2 @@ -89,8 +88,6 @@ do { \ #define SCSI_LUN(srb) ((srb)->device->lun) -typedef unsigned long DELAY_PARA_T; - struct rtsx_chip; struct rtsx_dev { @@ -131,16 +128,15 @@ struct rtsx_dev { struct rtsx_chip *chip; }; -typedef struct rtsx_dev rtsx_dev_t; - /* Convert between rtsx_dev and the corresponding Scsi_Host */ static inline struct Scsi_Host *rtsx_to_host(struct rtsx_dev *dev) { - return container_of((void *) dev, struct Scsi_Host, hostdata); + return container_of((void *)dev, struct Scsi_Host, hostdata); } + static inline struct rtsx_dev *host_to_rtsx(struct Scsi_Host *host) { - return (struct rtsx_dev *) host->hostdata; + return (struct rtsx_dev *)host->hostdata; } static inline void get_current_time(u8 *timeval_buf, int buf_len) @@ -165,8 +161,10 @@ static inline void get_current_time(u8 *timeval_buf, int buf_len) timeval_buf[7] = (u8)(tv_usec); } -/* The scsi_lock() and scsi_unlock() macros protect the sm_state and the - * single queue element srb for write access */ +/* + * The scsi_lock() and scsi_unlock() macros protect the sm_state and the + * single queue element srb for write access + */ #define scsi_unlock(host) spin_unlock_irq(host->host_lock) #define scsi_lock(host) spin_lock_irq(host->host_lock) |