From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Sun, 13 Mar 2016 18:41:25 +0100 Subject: [U-Boot] [PATCH v2 25/32] dm: usb: Convert USB storage to use driver-model for block devs In-Reply-To: References: <1456784765-10788-2-git-send-email-sjg@chromium.org> <1456784765-10788-26-git-send-email-sjg@chromium.org> <56D4CE67.3050106@denx.de> Message-ID: <56E5A645.6020209@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 03/13/2016 02:53 AM, Simon Glass wrote: > Hi Marek, > > On 29 February 2016 at 16:04, Marek Vasut wrote: >> 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 ? > > This is something that should not exist when driver model is used. So > I'd rather have it explicit so it is obvious that it can be removed > with the driver-model conversion is done. OK fine. >> >>> struct us_data; >>> typedef int (*trans_cmnd)(ccb *cb, struct us_data *data); >> >> Other than that: >> >> Reviewed-by: Marek Vasut >> >> -- >> Best regards, >> Marek Vasut > > Regards, > Simon > -- Best regards, Marek Vasut