Realtek cr: clean up unnecessary whitespaces.
Signed-off-by: edwin_rong <edwin_rong@realsil.com.cn> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
5b8261385c
commit
151d9fad6e
@@ -143,8 +143,9 @@ static int init_realtek_cr(struct us_data *us);
|
||||
|
||||
static const struct usb_device_id realtek_cr_ids[] = {
|
||||
# include "unusual_realtek.h"
|
||||
{ } /* Terminating entry */
|
||||
{} /* Terminating entry */
|
||||
};
|
||||
|
||||
MODULE_DEVICE_TABLE(usb, realtek_cr_ids);
|
||||
|
||||
#undef UNUSUAL_DEV
|
||||
@@ -165,7 +166,7 @@ MODULE_DEVICE_TABLE(usb, realtek_cr_ids);
|
||||
|
||||
static struct us_unusual_dev realtek_cr_unusual_dev_list[] = {
|
||||
# include "unusual_realtek.h"
|
||||
{ } /* Terminating entry */
|
||||
{} /* Terminating entry */
|
||||
};
|
||||
|
||||
#undef UNUSUAL_DEV
|
||||
@@ -174,8 +175,8 @@ static int rts51x_bulk_transport(struct us_data *us, u8 lun,
|
||||
u8 *cmd, int cmd_len, u8 *buf, int buf_len,
|
||||
enum dma_data_direction dir, int *act_len)
|
||||
{
|
||||
struct bulk_cb_wrap *bcb = (struct bulk_cb_wrap *) us->iobuf;
|
||||
struct bulk_cs_wrap *bcs = (struct bulk_cs_wrap *) us->iobuf;
|
||||
struct bulk_cb_wrap *bcb = (struct bulk_cb_wrap *)us->iobuf;
|
||||
struct bulk_cs_wrap *bcs = (struct bulk_cs_wrap *)us->iobuf;
|
||||
int result;
|
||||
unsigned int residue;
|
||||
unsigned int cswlen;
|
||||
@@ -220,8 +221,7 @@ static int rts51x_bulk_transport(struct us_data *us, u8 lun,
|
||||
/* check bulk status */
|
||||
if (bcs->Signature != cpu_to_le32(US_BULK_CS_SIGN)) {
|
||||
US_DEBUGP("Signature mismatch: got %08X, expecting %08X\n",
|
||||
le32_to_cpu(bcs->Signature),
|
||||
US_BULK_CS_SIGN);
|
||||
le32_to_cpu(bcs->Signature), US_BULK_CS_SIGN);
|
||||
return USB_STOR_TRANSPORT_ERROR;
|
||||
}
|
||||
|
||||
@@ -269,7 +269,7 @@ static int rts51x_get_max_lun(struct us_data *us)
|
||||
US_BULK_GET_MAX_LUN,
|
||||
USB_DIR_IN | USB_TYPE_CLASS |
|
||||
USB_RECIP_INTERFACE,
|
||||
0, us->ifnum, us->iobuf, 1, 10*HZ);
|
||||
0, us->ifnum, us->iobuf, 1, 10 * HZ);
|
||||
|
||||
US_DEBUGP("GetMaxLUN command result is %d, data is %d\n",
|
||||
result, us->iobuf[0]);
|
||||
@@ -284,16 +284,16 @@ static int rts51x_get_max_lun(struct us_data *us)
|
||||
static int rts51x_read_mem(struct us_data *us, u16 addr, u8 *data, u16 len)
|
||||
{
|
||||
int retval;
|
||||
u8 cmnd[12] = {0};
|
||||
u8 cmnd[12] = { 0 };
|
||||
|
||||
US_DEBUGP("%s, addr = 0x%x, len = %d\n", __func__, addr, len);
|
||||
|
||||
cmnd[0] = 0xF0;
|
||||
cmnd[1] = 0x0D;
|
||||
cmnd[2] = (u8)(addr >> 8);
|
||||
cmnd[3] = (u8)addr;
|
||||
cmnd[4] = (u8)(len >> 8);
|
||||
cmnd[5] = (u8)len;
|
||||
cmnd[2] = (u8) (addr >> 8);
|
||||
cmnd[3] = (u8) addr;
|
||||
cmnd[4] = (u8) (len >> 8);
|
||||
cmnd[5] = (u8) len;
|
||||
|
||||
retval = rts51x_bulk_transport(us, 0, cmnd, 12,
|
||||
data, len, DMA_FROM_DEVICE, NULL);
|
||||
@@ -306,16 +306,16 @@ static int rts51x_read_mem(struct us_data *us, u16 addr, u8 *data, u16 len)
|
||||
static int rts51x_write_mem(struct us_data *us, u16 addr, u8 *data, u16 len)
|
||||
{
|
||||
int retval;
|
||||
u8 cmnd[12] = {0};
|
||||
u8 cmnd[12] = { 0 };
|
||||
|
||||
US_DEBUGP("%s, addr = 0x%x, len = %d\n", __func__, addr, len);
|
||||
|
||||
cmnd[0] = 0xF0;
|
||||
cmnd[1] = 0x0E;
|
||||
cmnd[2] = (u8)(addr >> 8);
|
||||
cmnd[3] = (u8)addr;
|
||||
cmnd[4] = (u8)(len >> 8);
|
||||
cmnd[5] = (u8)len;
|
||||
cmnd[2] = (u8) (addr >> 8);
|
||||
cmnd[3] = (u8) addr;
|
||||
cmnd[4] = (u8) (len >> 8);
|
||||
cmnd[5] = (u8) len;
|
||||
|
||||
retval = rts51x_bulk_transport(us, 0, cmnd, 12,
|
||||
data, len, DMA_TO_DEVICE, NULL);
|
||||
@@ -329,7 +329,7 @@ static int rts51x_read_status(struct us_data *us,
|
||||
u8 lun, u8 *status, int len, int *actlen)
|
||||
{
|
||||
int retval;
|
||||
u8 cmnd[12] = {0};
|
||||
u8 cmnd[12] = { 0 };
|
||||
|
||||
US_DEBUGP("%s, lun = %d\n", __func__, lun);
|
||||
|
||||
@@ -356,12 +356,12 @@ static int rts51x_check_status(struct us_data *us, u8 lun)
|
||||
|
||||
US_DEBUGP("chip->status_len = %d\n", chip->status_len);
|
||||
|
||||
chip->status[lun].vid = ((u16)buf[0] << 8) | buf[1];
|
||||
chip->status[lun].pid = ((u16)buf[2] << 8) | buf[3];
|
||||
chip->status[lun].vid = ((u16) buf[0] << 8) | buf[1];
|
||||
chip->status[lun].pid = ((u16) buf[2] << 8) | buf[3];
|
||||
chip->status[lun].cur_lun = buf[4];
|
||||
chip->status[lun].card_type = buf[5];
|
||||
chip->status[lun].total_lun = buf[6];
|
||||
chip->status[lun].fw_ver = ((u16)buf[7] << 8) | buf[8];
|
||||
chip->status[lun].fw_ver = ((u16) buf[7] << 8) | buf[8];
|
||||
chip->status[lun].phy_exist = buf[9];
|
||||
chip->status[lun].multi_flag = buf[10];
|
||||
chip->status[lun].multi_card = buf[11];
|
||||
@@ -602,7 +602,7 @@ static int init_realtek_cr(struct us_data *us)
|
||||
goto INIT_FAIL;
|
||||
|
||||
for (i = 0; i <= (int)(chip->max_lun); i++) {
|
||||
retval = rts51x_check_status(us, (u8)i);
|
||||
retval = rts51x_check_status(us, (u8) i);
|
||||
if (retval < 0)
|
||||
goto INIT_FAIL;
|
||||
}
|
||||
@@ -640,11 +640,13 @@ static int realtek_cr_probe(struct usb_interface *intf,
|
||||
US_DEBUGP("Probe Realtek Card Reader!\n");
|
||||
|
||||
result = usb_stor_probe1(&us, intf, id,
|
||||
(id - realtek_cr_ids) + realtek_cr_unusual_dev_list);
|
||||
(id - realtek_cr_ids) +
|
||||
realtek_cr_unusual_dev_list);
|
||||
if (result)
|
||||
return result;
|
||||
|
||||
result = usb_stor_probe2(us);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user