diff options
author | Andrey Smirnov <andrew.smirnov@gmail.com> | 2019-03-07 00:00:32 -0800 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2019-03-11 08:11:18 +0100 |
commit | 3119a8bfa583deab7794cc06db8fd1a13f7cdf3d (patch) | |
tree | 280486da7ee28b85ba0dd0302fdaa27eeb93b895 | |
parent | 3a6cefb53b53af0ce6d4d674c2dea8b82342b204 (diff) | |
download | barebox-3119a8bfa583deab7794cc06db8fd1a13f7cdf3d.tar.gz barebox-3119a8bfa583deab7794cc06db8fd1a13f7cdf3d.tar.xz |
usb: storage: Drop needless macro
There's only user of the to_usb_mass_storage() so we may as well
inline it.
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r-- | drivers/usb/storage/usb.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c index 29e3792aae..0ab20f1ac2 100644 --- a/drivers/usb/storage/usb.c +++ b/drivers/usb/storage/usb.c @@ -203,15 +203,15 @@ static int usb_stor_io_10(struct us_blk_dev *usb_blkdev, u8 opcode, #define US_MAX_IO_BLK 32 -#define to_usb_mass_storage(x) container_of((x), struct us_blk_dev, blk) - enum { io_rd, io_wr }; /* Read / write a chunk of sectors on media */ static int usb_stor_blk_io(int io_op, struct block_device *disk_dev, int sector_start, int sector_count, void *buffer) { - struct us_blk_dev *pblk_dev = to_usb_mass_storage(disk_dev); + struct us_blk_dev *pblk_dev = container_of(disk_dev, + struct us_blk_dev, + blk); struct us_data *us = pblk_dev->us; struct device_d *dev = &us->pusb_dev->dev; unsigned sectors_done; |