diff options
| author | Wei WANG <wei_wang@realsil.com.cn> | 2013-04-26 22:49:13 -0400 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-05-16 20:28:27 -0400 |
| commit | 1c9e55cda44d770ce4e519f9672a4f11e87a2160 (patch) | |
| tree | 249716d28386c64643ad587306e7b4e57a6fa0ed | |
| parent | 7c8bfed7aaeba690de30835fe89882e1047a55fd (diff) | |
USB: usb-stor: realtek_cr: Fix compile error
To fix the compile error when CONFIG_PM_RUNTIME is not enabled,
move the declaration of us out of CONFIG_REALTEK_AUTOPM macro in rts51x_chip.
drivers/usb/storage/realtek_cr.c: In function 'realtek_cr_destructor':
drivers/usb/storage/realtek_cr.c:942:11: error: 'struct rts51x_chip' has no member named 'us'
Signed-off-by: Wei WANG <wei_wang@realsil.com.cn>
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| -rw-r--r-- | drivers/usb/storage/realtek_cr.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/usb/storage/realtek_cr.c b/drivers/usb/storage/realtek_cr.c index 8623577bbbe7..281be56d5648 100644 --- a/drivers/usb/storage/realtek_cr.c +++ b/drivers/usb/storage/realtek_cr.c | |||
| @@ -105,8 +105,9 @@ struct rts51x_chip { | |||
| 105 | int status_len; | 105 | int status_len; |
| 106 | 106 | ||
| 107 | u32 flag; | 107 | u32 flag; |
| 108 | #ifdef CONFIG_REALTEK_AUTOPM | ||
| 109 | struct us_data *us; | 108 | struct us_data *us; |
| 109 | |||
| 110 | #ifdef CONFIG_REALTEK_AUTOPM | ||
| 110 | struct timer_list rts51x_suspend_timer; | 111 | struct timer_list rts51x_suspend_timer; |
| 111 | unsigned long timer_expires; | 112 | unsigned long timer_expires; |
| 112 | int pwr_state; | 113 | int pwr_state; |
| @@ -988,6 +989,7 @@ static int init_realtek_cr(struct us_data *us) | |||
| 988 | us->extra = chip; | 989 | us->extra = chip; |
| 989 | us->extra_destructor = realtek_cr_destructor; | 990 | us->extra_destructor = realtek_cr_destructor; |
| 990 | us->max_lun = chip->max_lun = rts51x_get_max_lun(us); | 991 | us->max_lun = chip->max_lun = rts51x_get_max_lun(us); |
| 992 | chip->us = us; | ||
| 991 | 993 | ||
| 992 | usb_stor_dbg(us, "chip->max_lun = %d\n", chip->max_lun); | 994 | usb_stor_dbg(us, "chip->max_lun = %d\n", chip->max_lun); |
| 993 | 995 | ||
| @@ -1010,10 +1012,8 @@ static int init_realtek_cr(struct us_data *us) | |||
| 1010 | SET_AUTO_DELINK(chip); | 1012 | SET_AUTO_DELINK(chip); |
| 1011 | } | 1013 | } |
| 1012 | #ifdef CONFIG_REALTEK_AUTOPM | 1014 | #ifdef CONFIG_REALTEK_AUTOPM |
| 1013 | if (ss_en) { | 1015 | if (ss_en) |
| 1014 | chip->us = us; | ||
| 1015 | realtek_cr_autosuspend_setup(us); | 1016 | realtek_cr_autosuspend_setup(us); |
| 1016 | } | ||
| 1017 | #endif | 1017 | #endif |
| 1018 | 1018 | ||
| 1019 | usb_stor_dbg(us, "chip->flag = 0x%x\n", chip->flag); | 1019 | usb_stor_dbg(us, "chip->flag = 0x%x\n", chip->flag); |
