From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Tue, 01 Mar 2016 00:04:07 +0100 Subject: [U-Boot] [PATCH v2 25/32] dm: usb: Convert USB storage to use driver-model for block devs In-Reply-To: <1456784765-10788-26-git-send-email-sjg@chromium.org> References: <1456784765-10788-2-git-send-email-sjg@chromium.org> <1456784765-10788-26-git-send-email-sjg@chromium.org> Message-ID: <56D4CE67.3050106@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 02/29/2016 11:25 PM, Simon Glass wrote: > Update this code to support CONFIG_BLK. Each USB storage device can have > one or more block devices as children, each one representing a LUN > (logical unit) of the USB device. > > Signed-off-by: Simon Glass > --- > > Changes in v2: None > > common/usb_storage.c | 141 ++++++++++++++++++++++++++++++++++++++++++++++++--- > 1 file changed, 135 insertions(+), 6 deletions(-) > > diff --git a/common/usb_storage.c b/common/usb_storage.c > index 0475123..1472824 100644 > --- a/common/usb_storage.c > +++ b/common/usb_storage.c > @@ -43,6 +43,7 @@ > #include > #include > #include > +#include > > #include > #include > @@ -67,7 +68,9 @@ static __u32 CBWTag; > > static int usb_max_devs; /* number of highest available usb device */ > > +#ifndef CONFIG_BLK > static struct blk_desc usb_dev_desc[USB_MAX_STOR_DEV]; > +#endif You might want to use __maybe_unused to avoid the ifdef, do you think it makes sense ? > struct us_data; > typedef int (*trans_cmnd)(ccb *cb, struct us_data *data); Other than that: Reviewed-by: Marek Vasut -- Best regards, Marek Vasut