From: Kuninori Morimoto Date: Thu, 28 Apr 2011 07:40:54 +0000 (+0900) Subject: usb: renesas_usbhs: move pdev_to_priv to global X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=206dcc2cfe15b6174f15293ae15a097ee03eb386;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git usb: renesas_usbhs: move pdev_to_priv to global usbhs_pdev_to_priv function will be used in other files. Signed-off-by: Kuninori Morimoto Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/renesas_usbhs/common.c b/drivers/usb/renesas_usbhs/common.c index fda586d1f7d8..53be4443b5ed 100644 --- a/drivers/usb/renesas_usbhs/common.c +++ b/drivers/usb/renesas_usbhs/common.c @@ -56,6 +56,11 @@ void usbhs_bset(struct usbhs_priv *priv, u32 reg, u16 mask, u16 data) usbhs_write(priv, reg, val); } +struct usbhs_priv *usbhs_pdev_to_priv(struct platform_device *pdev) +{ + return dev_get_drvdata(&pdev->dev); +} + /* * syscfg functions */ @@ -113,11 +118,6 @@ int usbhs_frame_get_num(struct usbhs_priv *priv) /* * local functions */ -static struct usbhs_priv *usbhsc_pdev_to_priv(struct platform_device *pdev) -{ - return dev_get_drvdata(&pdev->dev); -} - static void usbhsc_bus_ctrl(struct usbhs_priv *priv, int enable) { int wait = usbhs_get_dparam(priv, buswait_bwait); @@ -210,7 +210,7 @@ static void usbhsc_notify_hotplug(struct work_struct *work) static int usbhsc_drvcllbck_notify_hotplug(struct platform_device *pdev) { - struct usbhs_priv *priv = usbhsc_pdev_to_priv(pdev); + struct usbhs_priv *priv = usbhs_pdev_to_priv(pdev); /* * This functions will be called in interrupt. @@ -351,7 +351,7 @@ probe_end_kfree: static int __devexit usbhs_remove(struct platform_device *pdev) { - struct usbhs_priv *priv = usbhsc_pdev_to_priv(pdev); + struct usbhs_priv *priv = usbhs_pdev_to_priv(pdev); struct renesas_usbhs_platform_info *info = pdev->dev.platform_data; struct renesas_usbhs_driver_callback *dfunc = &info->driver_callback; diff --git a/drivers/usb/renesas_usbhs/common.h b/drivers/usb/renesas_usbhs/common.h index f1a2b62f93f9..f3b907d26082 100644 --- a/drivers/usb/renesas_usbhs/common.h +++ b/drivers/usb/renesas_usbhs/common.h @@ -217,6 +217,7 @@ int usbhs_frame_get_num(struct usbhs_priv *priv); /* * data */ +struct usbhs_priv *usbhs_pdev_to_priv(struct platform_device *pdev); #define usbhs_get_dparam(priv, param) (priv->dparam->param) #define usbhs_priv_to_pdev(priv) (priv->pdev) #define usbhs_priv_to_dev(priv) (&priv->pdev->dev)