提交 f99b2bfe 编写于 作者: L Lukasz Majewski 提交者: Felipe Balbi

usb:hsotg:samsung: Remove our_hsotg global pointer

The our_hsotg global pointer to hsotg USB device state is removed.
It has been replaced with to_hsotg(gadget) function.
Signed-off-by: NLukasz Majewski <l.majewski@samsung.com>
Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: NFelipe Balbi <balbi@ti.com>
上级 8b9bc460
......@@ -2194,8 +2194,6 @@ static void s3c_hsotg_irq_fifoempty(struct s3c_hsotg *hsotg, bool periodic)
}
}
static struct s3c_hsotg *our_hsotg;
/* IRQ flags which will trigger a retry around the IRQ loop */
#define IRQ_RETRY_MASK (S3C_GINTSTS_NPTxFEmp | \
S3C_GINTSTS_PTxFEmp | \
......@@ -2930,7 +2928,7 @@ static void s3c_hsotg_init(struct s3c_hsotg *hsotg)
static int s3c_hsotg_udc_start(struct usb_gadget *gadget,
struct usb_gadget_driver *driver)
{
struct s3c_hsotg *hsotg = our_hsotg;
struct s3c_hsotg *hsotg = to_hsotg(gadget);
int ret;
if (!hsotg) {
......@@ -2989,7 +2987,7 @@ static int s3c_hsotg_udc_start(struct usb_gadget *gadget,
static int s3c_hsotg_udc_stop(struct usb_gadget *gadget,
struct usb_gadget_driver *driver)
{
struct s3c_hsotg *hsotg = our_hsotg;
struct s3c_hsotg *hsotg = to_hsotg(gadget);
int ep;
if (!hsotg)
......@@ -3624,7 +3622,6 @@ static int __devinit s3c_hsotg_probe(struct platform_device *pdev)
s3c_hsotg_dump(hsotg);
our_hsotg = hsotg;
return 0;
err_ep_mem:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册