summaryrefslogtreecommitdiffstats
path: root/drivers/usb/storage/usb.c
diff options
context:
space:
mode:
authorAndrey Smirnov <andrew.smirnov@gmail.com>2019-03-07 00:00:32 -0800
committerSascha Hauer <s.hauer@pengutronix.de>2019-03-11 08:11:18 +0100
commit3119a8bfa583deab7794cc06db8fd1a13f7cdf3d (patch)
tree280486da7ee28b85ba0dd0302fdaa27eeb93b895 /drivers/usb/storage/usb.c
parent3a6cefb53b53af0ce6d4d674c2dea8b82342b204 (diff)
downloadbarebox-3119a8bfa583deab7794cc06db8fd1a13f7cdf3d.tar.gz
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>
Diffstat (limited to 'drivers/usb/storage/usb.c')
-rw-r--r--drivers/usb/storage/usb.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c
index 29e3792..0ab20f1 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;