usb: host: xhci: plat: finally get rid of xhci_plat_type_is()
Now that there are no more users for xhci_plat_type_is(), we can safely remove it. Acked-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
b1c127ae99
commit
c06fac7fa0
|
@ -86,19 +86,16 @@ static int xhci_plat_start(struct usb_hcd *hcd)
|
||||||
|
|
||||||
#ifdef CONFIG_OF
|
#ifdef CONFIG_OF
|
||||||
static const struct xhci_plat_priv xhci_plat_marvell_armada = {
|
static const struct xhci_plat_priv xhci_plat_marvell_armada = {
|
||||||
.type = XHCI_PLAT_TYPE_MARVELL_ARMADA,
|
|
||||||
.init_quirk = xhci_mvebu_mbus_init_quirk,
|
.init_quirk = xhci_mvebu_mbus_init_quirk,
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct xhci_plat_priv xhci_plat_renesas_rcar_gen2 = {
|
static const struct xhci_plat_priv xhci_plat_renesas_rcar_gen2 = {
|
||||||
.type = XHCI_PLAT_TYPE_RENESAS_RCAR_GEN2,
|
|
||||||
.firmware_name = XHCI_RCAR_FIRMWARE_NAME_V1,
|
.firmware_name = XHCI_RCAR_FIRMWARE_NAME_V1,
|
||||||
.init_quirk = xhci_rcar_init_quirk,
|
.init_quirk = xhci_rcar_init_quirk,
|
||||||
.plat_start = xhci_rcar_start,
|
.plat_start = xhci_rcar_start,
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct xhci_plat_priv xhci_plat_renesas_rcar_gen3 = {
|
static const struct xhci_plat_priv xhci_plat_renesas_rcar_gen3 = {
|
||||||
.type = XHCI_PLAT_TYPE_RENESAS_RCAR_GEN3,
|
|
||||||
.firmware_name = XHCI_RCAR_FIRMWARE_NAME_V2,
|
.firmware_name = XHCI_RCAR_FIRMWARE_NAME_V2,
|
||||||
.init_quirk = xhci_rcar_init_quirk,
|
.init_quirk = xhci_rcar_init_quirk,
|
||||||
.plat_start = xhci_rcar_start,
|
.plat_start = xhci_rcar_start,
|
||||||
|
|
|
@ -13,29 +13,11 @@
|
||||||
|
|
||||||
#include "xhci.h" /* for hcd_to_xhci() */
|
#include "xhci.h" /* for hcd_to_xhci() */
|
||||||
|
|
||||||
enum xhci_plat_type {
|
|
||||||
XHCI_PLAT_TYPE_MARVELL_ARMADA = 1,
|
|
||||||
XHCI_PLAT_TYPE_RENESAS_RCAR_GEN2,
|
|
||||||
XHCI_PLAT_TYPE_RENESAS_RCAR_GEN3,
|
|
||||||
};
|
|
||||||
|
|
||||||
struct xhci_plat_priv {
|
struct xhci_plat_priv {
|
||||||
enum xhci_plat_type type;
|
|
||||||
const char *firmware_name;
|
const char *firmware_name;
|
||||||
void (*plat_start)(struct usb_hcd *);
|
void (*plat_start)(struct usb_hcd *);
|
||||||
int (*init_quirk)(struct usb_hcd *);
|
int (*init_quirk)(struct usb_hcd *);
|
||||||
};
|
};
|
||||||
|
|
||||||
#define hcd_to_xhci_priv(h) ((struct xhci_plat_priv *)hcd_to_xhci(h)->priv)
|
#define hcd_to_xhci_priv(h) ((struct xhci_plat_priv *)hcd_to_xhci(h)->priv)
|
||||||
|
|
||||||
static inline bool xhci_plat_type_is(struct usb_hcd *hcd,
|
|
||||||
enum xhci_plat_type type)
|
|
||||||
{
|
|
||||||
struct xhci_plat_priv *priv = hcd_to_xhci_priv(hcd);
|
|
||||||
|
|
||||||
if (priv && priv->type == type)
|
|
||||||
return true;
|
|
||||||
else
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
#endif /* _XHCI_PLAT_H */
|
#endif /* _XHCI_PLAT_H */
|
||||||
|
|
Loading…
Reference in New Issue