Date:2011-07-06 16:30:27 (9 years 2 months ago)
Author:Werner Almesberger
Commit:7b40185715c221c5592732066510c42760743e65
Message:atusb: renamed atusb_read1_cb to atusb_ctrl_cb

Since we use it for read and write, better give it a more generic name.

Signed-off-by: Werner Almesberger <werner@almesberger.net>
Files: drivers/spi/atusb.c (3 diffs)

Change Details

drivers/spi/atusb.c
108108#define ATUSB_FROM_DEV (USB_TYPE_VENDOR | USB_DIR_IN)
109109#define ATUSB_TO_DEV (USB_TYPE_VENDOR | USB_DIR_OUT)
110110
111static void atusb_read1_cb(struct urb *urb)
111static void atusb_ctrl_cb(struct urb *urb)
112112{
113113    struct atusb_local *atusb = urb->context;
114114    struct spi_message *msg = atusb->msg;
...... 
275275    dev_info(&atusb->udev->dev, "atusb_read1: tx = 0x%x\n", tx);
276276    return submit_control_msg(atusb,
277277        ATUSB_SPI_READ1, ATUSB_FROM_DEV, tx, 0,
278        rx, 1, atusb_read1_cb, atusb);
278        rx, 1, atusb_ctrl_cb, atusb);
279279}
280280
281281static int atusb_read_fb(struct atusb_local *atusb,
...... 
294294    dev_info(&atusb->udev->dev, "atusb_write: tx[1] = 0x%x\n", tx1);
295295    return submit_control_msg(atusb,
296296        ATUSB_SPI_WRITE, ATUSB_TO_DEV, tx0, tx1,
297        (uint8_t *) tx, len, atusb_read1_cb, atusb);
297        (uint8_t *) tx, len, atusb_ctrl_cb, atusb);
298298}
299299
300300static int atusb_transfer(struct spi_device *spi, struct spi_message *msg)

Archive Download the corresponding diff file



interactive