Make the USB disconnect feature dependent on HAVE_USB_POWER. This may not

be that useful, but (a) it fixes compile errors on ZVM, and (b) if you don't
have USB power, why leave the device plugged in anyway? (a.k.a. fix red)


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20246 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Frank Gevaerts 2009-03-08 19:00:21 +00:00
parent b9d8ae49d9
commit 1a09bf2f9b

View file

@ -108,7 +108,8 @@ int handle_usb_events(struct event_queue *q)
case SYS_TIMEOUT:
break;
}
#if defined(HAVE_USBSTACK) && defined(USE_ROCKBOX_USB)
#if defined(HAVE_USBSTACK) && defined(USE_ROCKBOX_USB) \
&& defined(HAVE_USB_POWER)
if((button_status() & ~USBPOWER_BTN_IGNORE) == USBPOWER_BUTTON)
{
usb_storage_try_release_storage();