From 3119a8bfa583deab7794cc06db8fd1a13f7cdf3d Mon Sep 17 00:00:00 2001 From: Andrey Smirnov Date: Thu, 7 Mar 2019 00:00:32 -0800 Subject: 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 Signed-off-by: Sascha Hauer --- drivers/usb/storage/usb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers') 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; -- cgit v1.2.3