|
@@ -350,7 +350,7 @@ static int ohci_at91_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
|
|
|
|
|
|
case USB_PORT_FEAT_SUSPEND:
|
|
|
dev_dbg(hcd->self.controller, "SetPortFeat: SUSPEND\n");
|
|
|
- if (valid_port(wIndex)) {
|
|
|
+ if (valid_port(wIndex) && ohci_at91->sfr_regmap) {
|
|
|
ohci_at91_port_suspend(ohci_at91->sfr_regmap,
|
|
|
1);
|
|
|
return 0;
|
|
@@ -393,7 +393,7 @@ static int ohci_at91_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
|
|
|
|
|
|
case USB_PORT_FEAT_SUSPEND:
|
|
|
dev_dbg(hcd->self.controller, "ClearPortFeature: SUSPEND\n");
|
|
|
- if (valid_port(wIndex)) {
|
|
|
+ if (valid_port(wIndex) && ohci_at91->sfr_regmap) {
|
|
|
ohci_at91_port_suspend(ohci_at91->sfr_regmap,
|
|
|
0);
|
|
|
return 0;
|