]> git.dujemihanovic.xyz Git - u-boot.git/commit
usb: ums: fix disk capacity miscalculation and code cleanup
authorPrzemyslaw Marczak <p.marczak@samsung.com>
Wed, 23 Oct 2013 12:30:44 +0000 (14:30 +0200)
committerMarek Vasut <marex@denx.de>
Fri, 8 Nov 2013 19:46:19 +0000 (20:46 +0100)
commit0697f206dfbbb5821fbf03283dce0b96515167cf
tree44d1700294f8d9f53243fbf60786f541020adfaa
parentf4dacf7b95e9f7d4246db00facdbe366b5c30a5a
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>
board/samsung/trats/trats.c
drivers/usb/gadget/storage_common.c
include/usb_mass_storage.h