Skip to content

Commit 0cc0d7a

Browse files
phcoderani-sinha
authored andcommitted
* grub-core/bus/usb/ehci.c (grub_ehci_restore_hw): Return right enum type. (grub_ehci_fini_hw): Likewise. * grub-core/bus/usb/usbhub.c (grub_usb_add_hub): Likewise.
1 parent d0386e6 commit 0cc0d7a

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

grub-core/bus/usb/ehci.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#include <grub/time.h>
2929
#include <grub/loader.h>
3030
#include <grub/cs5536.h>
31+
#include <grub/err.h>
3132

3233
GRUB_MOD_LICENSE ("GPLv3+");
3334

@@ -1259,7 +1260,7 @@ grub_ehci_setup_transfer (grub_usb_controller_t dev,
12591260
if ((transfer->dev->speed != GRUB_USB_SPEED_HIGH)
12601261
&& !transfer->dev->hubaddr)
12611262
{
1262-
grub_error (GRUB_USB_ERR_BADDEVICE,
1263+
grub_error (GRUB_ERR_BAD_DEVICE,
12631264
"FULL/LOW speed device on EHCI port!?!");
12641265
return GRUB_USB_ERR_BADDEVICE;
12651266
}
@@ -1719,7 +1720,7 @@ grub_ehci_portstatus (grub_usb_controller_t dev,
17191720
/* FULL speed device connected - change port ownership.
17201721
* It results in disconnected state of this EHCI port. */
17211722
grub_ehci_port_setbits (e, port, GRUB_EHCI_PORT_OWNER);
1722-
return GRUB_USB_ERR_BADDEVICE;
1723+
return GRUB_ERR_BAD_DEVICE;
17231724
}
17241725

17251726
/* XXX: Fix it! There is possible problem - we can say to calling
@@ -1866,7 +1867,7 @@ grub_ehci_restore_hw (void)
18661867
}
18671868
}
18681869

1869-
return GRUB_USB_ERR_NONE;
1870+
return GRUB_ERR_NONE;
18701871
}
18711872

18721873
static grub_err_t
@@ -1886,7 +1887,7 @@ grub_ehci_fini_hw (int noreturn __attribute__ ((unused)))
18861887
grub_error (GRUB_ERR_TIMEOUT, "restore_hw: EHCI reset timeout");
18871888
}
18881889

1889-
return GRUB_USB_ERR_NONE;
1890+
return GRUB_ERR_NONE;
18901891
}
18911892

18921893
static struct grub_usb_controller_dev usb_controller = {

grub-core/bus/usb/usbhub.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ grub_usb_add_hub (grub_usb_device_t dev)
181181

182182
rescan = 1;
183183

184-
return GRUB_ERR_NONE;
184+
return GRUB_USB_ERR_NONE;
185185
}
186186

187187
static void

0 commit comments

Comments
 (0)