libpayload: Add a pointer for user data on the USB MSC data structure.

This is so the user of libpayload can attach data to the device which it can
retrieve when the device is referred to later, for instance in usbdisk_remove.
Otherwise, there's no direct connection from the usbdev_t structure to any
bookkeeping in the host firmware.

Change-Id: I36fe693b0dcd2098e359c26744e376e73bd3a723
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: http://review.coreboot.org/2513
Tested-by: build bot (Jenkins)
Reviewed-by: Nico Huber <nico.huber@secunet.com>
This commit is contained in:
Gabe Black 2012-11-01 18:46:05 -07:00 committed by Stefan Reinauer
parent 5e70766f14
commit 89ccc9285e
1 changed files with 1 additions and 0 deletions

View File

@ -36,6 +36,7 @@ typedef struct {
endpoint_t *bulk_in; endpoint_t *bulk_in;
endpoint_t *bulk_out; endpoint_t *bulk_out;
int usbdisk_created; int usbdisk_created;
void *data; /* For use by consumers of libpayload. */
} usbmsc_inst_t; } usbmsc_inst_t;
#define MSC_INST(dev) ((usbmsc_inst_t*)(dev)->data) #define MSC_INST(dev) ((usbmsc_inst_t*)(dev)->data)