usb: Tidy up the usb_start flag
This should be declared in a header file so that type-checking works correctly. Add a single declaration to usb.h and remove the others. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Marek Vasut <marex@denx.de> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
This commit is contained in:
parent
76afc8457e
commit
9fea3a799d
6 changed files with 6 additions and 8 deletions
|
@ -620,7 +620,6 @@ static int do_usb(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
|
||||||
{
|
{
|
||||||
struct usb_device *udev = NULL;
|
struct usb_device *udev = NULL;
|
||||||
int i;
|
int i;
|
||||||
extern char usb_started;
|
|
||||||
|
|
||||||
if (argc < 2)
|
if (argc < 2)
|
||||||
return CMD_RET_USAGE;
|
return CMD_RET_USAGE;
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
#define USB_BUFSIZ 512
|
#define USB_BUFSIZ 512
|
||||||
|
|
||||||
static int asynch_allowed;
|
static int asynch_allowed;
|
||||||
char usb_started; /* flag for the started/stopped USB status */
|
bool usb_started; /* flag for the started/stopped USB status */
|
||||||
|
|
||||||
#if !CONFIG_IS_ENABLED(DM_USB)
|
#if !CONFIG_IS_ENABLED(DM_USB)
|
||||||
static struct usb_device usb_dev[USB_MAX_DEVICE];
|
static struct usb_device usb_dev[USB_MAX_DEVICE];
|
||||||
|
|
|
@ -18,7 +18,6 @@
|
||||||
#include <dm/lists.h>
|
#include <dm/lists.h>
|
||||||
#include <dm/uclass-internal.h>
|
#include <dm/uclass-internal.h>
|
||||||
|
|
||||||
extern bool usb_started; /* flag for the started/stopped USB status */
|
|
||||||
static bool asynch_allowed;
|
static bool asynch_allowed;
|
||||||
|
|
||||||
struct usb_uclass_priv {
|
struct usb_uclass_priv {
|
||||||
|
|
|
@ -11,12 +11,15 @@
|
||||||
#ifndef _USB_H_
|
#ifndef _USB_H_
|
||||||
#define _USB_H_
|
#define _USB_H_
|
||||||
|
|
||||||
|
#include <stdbool.h>
|
||||||
#include <fdtdec.h>
|
#include <fdtdec.h>
|
||||||
#include <usb_defs.h>
|
#include <usb_defs.h>
|
||||||
#include <linux/usb/ch9.h>
|
#include <linux/usb/ch9.h>
|
||||||
#include <asm/cache.h>
|
#include <asm/cache.h>
|
||||||
#include <part.h>
|
#include <part.h>
|
||||||
|
|
||||||
|
extern bool usb_started; /* flag for the started/stopped USB status */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The EHCI spec says that we must align to at least 32 bytes. However,
|
* The EHCI spec says that we must align to at least 32 bytes. However,
|
||||||
* some platforms require larger alignment.
|
* some platforms require larger alignment.
|
||||||
|
|
|
@ -19,9 +19,9 @@
|
||||||
|
|
||||||
/* Allow reseting the USB-started flag */
|
/* Allow reseting the USB-started flag */
|
||||||
#if defined(CONFIG_USB_HOST) || defined(CONFIG_USB_GADGET)
|
#if defined(CONFIG_USB_HOST) || defined(CONFIG_USB_GADGET)
|
||||||
extern char usb_started;
|
extern bool usb_started;
|
||||||
#else
|
#else
|
||||||
char usb_started;
|
#include <usb.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Check 'bootdev list' command */
|
/* Check 'bootdev list' command */
|
||||||
|
|
|
@ -16,9 +16,6 @@
|
||||||
|
|
||||||
DECLARE_GLOBAL_DATA_PTR;
|
DECLARE_GLOBAL_DATA_PTR;
|
||||||
|
|
||||||
/* Allow resetting the USB-started flag */
|
|
||||||
extern char usb_started;
|
|
||||||
|
|
||||||
/* Test that block devices can be created */
|
/* Test that block devices can be created */
|
||||||
static int dm_test_blk_base(struct unit_test_state *uts)
|
static int dm_test_blk_base(struct unit_test_state *uts)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue