From: Michael Grzeschik <m.grzeschik-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org> To: linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org Cc: alexander.shishkin-VuQAYsv1563Yd54FQh9/CA@public.gmane.org, mkl-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org, gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org, fabio.estevam-KZfg59tc24xl57MIdRCFDg@public.gmane.org, kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org Subject: [PATCH 1/6] usb: chipidea: usbmisc: unset global varibale usbmisc on driver remove Date: Wed, 14 Nov 2012 12:55:32 +0100 [thread overview] Message-ID: <1352894137-2050-2-git-send-email-m.grzeschik@pengutronix.de> (raw) In-Reply-To: <1352894137-2050-1-git-send-email-m.grzeschik-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org> From: Marc Kleine-Budde <mkl-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org> While there fix a potential race condition, first set usbmisc, then call usbmisc_set_ops(). Signed-off-by: Marc Kleine-Budde <mkl-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org> Signed-off-by: Michael Grzeschik <m.grzeschik-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org> --- drivers/usb/chipidea/usbmisc_imx6q.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/usb/chipidea/usbmisc_imx6q.c b/drivers/usb/chipidea/usbmisc_imx6q.c index 416e3fc..edc0edd 100644 --- a/drivers/usb/chipidea/usbmisc_imx6q.c +++ b/drivers/usb/chipidea/usbmisc_imx6q.c @@ -116,14 +116,14 @@ static int __devinit usbmisc_imx6q_probe(struct platform_device *pdev) return ret; } + usbmisc = data; ret = usbmisc_set_ops(&imx6q_usbmisc_ops); if (ret) { + usbmisc = NULL; clk_disable_unprepare(data->clk); return ret; } - usbmisc = data;
WARNING: multiple messages have this Message-ID (diff)
From: m.grzeschik@pengutronix.de (Michael Grzeschik) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 1/6] usb: chipidea: usbmisc: unset global varibale usbmisc on driver remove Date: Wed, 14 Nov 2012 12:55:32 +0100 [thread overview] Message-ID: <1352894137-2050-2-git-send-email-m.grzeschik@pengutronix.de> (raw) In-Reply-To: <1352894137-2050-1-git-send-email-m.grzeschik@pengutronix.de> From: Marc Kleine-Budde <mkl@pengutronix.de> While there fix a potential race condition, first set usbmisc, then call usbmisc_set_ops(). Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> --- drivers/usb/chipidea/usbmisc_imx6q.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/usb/chipidea/usbmisc_imx6q.c b/drivers/usb/chipidea/usbmisc_imx6q.c index 416e3fc..edc0edd 100644 --- a/drivers/usb/chipidea/usbmisc_imx6q.c +++ b/drivers/usb/chipidea/usbmisc_imx6q.c @@ -116,14 +116,14 @@ static int __devinit usbmisc_imx6q_probe(struct platform_device *pdev) return ret; } + usbmisc = data; ret = usbmisc_set_ops(&imx6q_usbmisc_ops); if (ret) { + usbmisc = NULL; clk_disable_unprepare(data->clk); return ret; } - usbmisc = data; - return 0; } @@ -131,6 +131,7 @@ static int __devexit usbmisc_imx6q_remove(struct platform_device *pdev) { usbmisc_unset_ops(&imx6q_usbmisc_ops); clk_disable_unprepare(usbmisc->clk); + usbmisc = NULL; return 0; } -- 1.7.10.4
next prev parent reply other threads:[~2012-11-14 11:55 UTC|newest] Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-11-14 11:55 [PATCH 0/6] support other fsl SoCs with usbmisc + small fixes Michael Grzeschik 2012-11-14 11:55 ` Michael Grzeschik [not found] ` <1352894137-2050-1-git-send-email-m.grzeschik-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org> 2012-11-14 11:55 ` Michael Grzeschik [this message] 2012-11-14 11:55 ` [PATCH 1/6] usb: chipidea: usbmisc: unset global varibale usbmisc on driver remove Michael Grzeschik [not found] ` <1352894137-2050-2-git-send-email-m.grzeschik-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org> 2012-11-14 13:22 ` Alexander Shishkin 2012-11-14 13:22 ` Alexander Shishkin 2012-11-14 11:55 ` [PATCH 2/6] usb: chipidea: usbmisc: rename file, struct and functions to usbmisc_imx Michael Grzeschik 2012-11-14 11:55 ` Michael Grzeschik [not found] ` <1352894137-2050-3-git-send-email-m.grzeschik-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org> 2012-11-14 11:57 ` Fabio Estevam 2012-11-14 11:57 ` Fabio Estevam [not found] ` <CAOMZO5Ajdp3DT1b+Mx6ufjhuCoOmZ6CEwk+TgWEj-mjd1Hub1Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2012-11-14 15:32 ` Michael Grzeschik 2012-11-14 15:32 ` Michael Grzeschik 2012-11-14 13:25 ` Alexander Shishkin 2012-11-14 13:25 ` Alexander Shishkin [not found] ` <87pq3g71v9.fsf-qxRn5AmX6ZD9BXuAQUXR0fooFf0ArEBIu+b9c/7xato@public.gmane.org> 2012-11-14 13:28 ` Michael Grzeschik 2012-11-14 13:28 ` Michael Grzeschik [not found] ` <20121114132807.GA12976-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org> 2012-11-14 13:32 ` Alexander Shishkin 2012-11-14 13:32 ` Alexander Shishkin 2012-11-14 11:55 ` [PATCH 3/6] usb: chipidea: usbmisc: prepare driver to handle more than one soc Michael Grzeschik 2012-11-14 11:55 ` Michael Grzeschik 2012-11-14 11:55 ` [PATCH 4/6] usb: chipidea: usbmisc: add support for ahb, ipg and per clock Michael Grzeschik 2012-11-14 11:55 ` Michael Grzeschik [not found] ` <1352894137-2050-5-git-send-email-m.grzeschik-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org> 2012-11-14 13:39 ` Alexander Shishkin 2012-11-14 13:39 ` Alexander Shishkin [not found] ` <87mwyk718g.fsf-qxRn5AmX6ZD9BXuAQUXR0fooFf0ArEBIu+b9c/7xato@public.gmane.org> 2012-11-14 15:27 ` Michael Grzeschik 2012-11-14 15:27 ` Michael Grzeschik 2012-11-14 11:55 ` [PATCH 5/6] usb: chipidea: usbmisc: add mx53 support Michael Grzeschik 2012-11-14 11:55 ` Michael Grzeschik 2012-11-14 11:55 ` [PATCH 6/6] usb: chipidea: usbmisc: add post handling and errata fix for mx25 Michael Grzeschik 2012-11-14 11:55 ` Michael Grzeschik [not found] ` <1352894137-2050-7-git-send-email-m.grzeschik-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org> 2012-11-15 10:08 ` Martin Fuzzey 2012-11-15 10:08 ` Martin Fuzzey [not found] ` <CALBypN6U=np93ZwnEZqbh=j0Vb_-x630GaktEiv+4K26eYp4Pg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2012-11-15 10:25 ` Michael Grzeschik 2012-11-15 10:25 ` Michael Grzeschik [not found] ` <20121115102525.GA16118-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org> 2012-11-15 13:51 ` Martin Fuzzey 2012-11-15 13:51 ` Martin Fuzzey [not found] ` <CALBypN7-NKFmoPXWA0utFhUjLOWjvzwJ7ZSuQBa+W5edNQA_OA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2012-11-15 13:54 ` Marc Kleine-Budde 2012-11-15 13:54 ` Marc Kleine-Budde
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1352894137-2050-2-git-send-email-m.grzeschik@pengutronix.de \ --to=m.grzeschik-bicnvbalz9megne8c9+irq@public.gmane.org \ --cc=alexander.shishkin-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \ --cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \ --cc=fabio.estevam-KZfg59tc24xl57MIdRCFDg@public.gmane.org \ --cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \ --cc=kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \ --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \ --cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \ --cc=mkl-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.