Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4c03433e authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "USB: EHCI: Allow more methods for overriding"

parents ea19bfb9 c4fffe58
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -1221,8 +1221,14 @@ void ehci_init_driver(struct hc_driver *drv,

	if (over) {
		drv->hcd_priv_size += over->extra_priv_size;
		if (over->flags)
			drv->flags = over->flags;
		if (over->reset)
			drv->reset = over->reset;
		if (over->bus_suspend)
			drv->bus_suspend = over->bus_suspend;
		if (over->bus_resume)
			drv->bus_resume = over->bus_resume;
	}
}
EXPORT_SYMBOL_GPL(ehci_init_driver);
+4 −3
Original line number Diff line number Diff line
@@ -218,7 +218,7 @@ static void ehci_adjust_port_wakeup_flags(struct ehci_hcd *ehci,
	spin_unlock_irq(&ehci->lock);
}

static int ehci_bus_suspend (struct usb_hcd *hcd)
int ehci_bus_suspend(struct usb_hcd *hcd)
{
	struct ehci_hcd		*ehci = hcd_to_ehci (hcd);
	int			port;
@@ -359,10 +359,10 @@ static int ehci_bus_suspend (struct usb_hcd *hcd)
	hrtimer_cancel(&ehci->hrtimer);
	return 0;
}

EXPORT_SYMBOL(ehci_bus_suspend);

/* caller has locked the root hub, and should reset/reinit on error */
static int __maybe_unused ehci_bus_resume(struct usb_hcd *hcd)
int __maybe_unused ehci_bus_resume(struct usb_hcd *hcd)
{
	struct ehci_hcd		*ehci = hcd_to_ehci (hcd);
	u32			temp;
@@ -515,6 +515,7 @@ skip_clear_resume:
	spin_unlock_irq(&ehci->lock);
	return -ESHUTDOWN;
}
EXPORT_SYMBOL(ehci_bus_resume);

#else

+5 −0
Original line number Diff line number Diff line
@@ -802,7 +802,10 @@ static inline u32 hc32_to_cpup (const struct ehci_hcd *ehci, const __hc32 *x)

struct ehci_driver_overrides {
	size_t		extra_priv_size;
	int		flags;
	int		(*reset)(struct usb_hcd *hcd);
	int		(*bus_suspend)(struct usb_hcd *hcd);
	int		(*bus_resume)(struct usb_hcd *hcd);
};

extern void	ehci_init_driver(struct hc_driver *drv,
@@ -810,6 +813,8 @@ extern void ehci_init_driver(struct hc_driver *drv,
extern int	ehci_setup(struct usb_hcd *hcd);

#ifdef CONFIG_PM
extern int ehci_bus_suspend(struct usb_hcd *hcd);
extern int ehci_bus_resume(struct usb_hcd *hcd);
extern int	ehci_suspend(struct usb_hcd *hcd, bool do_wakeup);
extern int	ehci_resume(struct usb_hcd *hcd, bool hibernated);
#endif	/* CONFIG_PM */