summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPrzemyslaw Marczak <p.marczak@samsung.com>2013-10-23 14:30:44 +0200
committerMarek Vasut <marex@denx.de>2013-11-08 20:46:19 +0100
commit0697f206dfbbb5821fbf03283dce0b96515167cf (patch)
tree44d1700294f8d9f53243fbf60786f541020adfaa /include
parentf4dacf7b95e9f7d4246db00facdbe366b5c30a5a (diff)
usb: ums: fix disk capacity miscalculation and code cleanup
This patch prevents: - ums disk capacity miscalculation because of integer overflow Changes v2: - Prevents passing zero size disk capacity to ums gadget driver - Change function ums_get_capacity() to ums_disk_init() and do ums disk initialization before gadget init - Remove unnecessary code from mass storage driver Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com> Cc: Marek Vasut <marex@denx.de>
Diffstat (limited to 'include')
-rw-r--r--include/usb_mass_storage.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/include/usb_mass_storage.h b/include/usb_mass_storage.h
index 674ca70c59..9df3adcf2a 100644
--- a/include/usb_mass_storage.h
+++ b/include/usb_mass_storage.h
@@ -25,12 +25,10 @@ struct ums {
ulong start, lbaint_t blkcnt, void *buf);
int (*write_sector)(struct ums *ums_dev,
ulong start, lbaint_t blkcnt, const void *buf);
- void (*get_capacity)(struct ums *ums_dev,
- long long int *capacity);
+ unsigned int start_sector;
+ unsigned int num_sectors;
const char *name;
struct mmc *mmc;
- int offset;
- int part_size;
};
extern struct ums *ums;