From: Karl Lessard <klessard@sunrisetelecom.com>
To: linux-mips <linux-mips@linux-mips.org>
Subject: Duplicated allocation in AU1xxx OHCI driver
Date: Thu, 14 Oct 2004 15:45:39 -0400 [thread overview]
Message-ID: <416ED763.2090501@sunrisetelecom.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 388 bytes --]
Hello,
I was looking at the code of the new ohci-au1xxx, and I've figured out
that operationnal regiters resource
is allocated two times: once when registering the OHCI platform device
(check in drivers/base/platform.c),
and once in OHCI driver probe.
Is that ok?? I'm kind of surprised that the second allocation doesn't
failed. Removing it seems to works
well for me.
Thanks,
Karl
[-- Attachment #2: ohci-au1xxx.patch --]
[-- Type: text/plain, Size: 1036 bytes --]
--- linux-mips/drivers/usb/host/ohci-au1xxx.c Sun Oct 10 13:56:25 2004
+++ linux/drivers/usb/host/ohci-au1xxx.c Thu Oct 14 15:39:11 2004
@@ -91,13 +91,6 @@ int usb_hcd_au1xxx_probe (const struct h
struct usb_hcd *hcd = 0;
unsigned int *addr = NULL;
-
- if (!request_mem_region(dev->resource[0].start,
- dev->resource[0].end
- - dev->resource[0].start + 1, hcd_name)) {
- pr_debug("request_mem_region failed");
- return -EBUSY;
- }
au1xxx_start_hc(dev);
@@ -173,9 +166,6 @@ int usb_hcd_au1xxx_probe (const struct h
driver->hcd_free(hcd);
err1:
au1xxx_stop_hc(dev);
- release_mem_region(dev->resource[0].start,
- dev->resource[0].end
- - dev->resource[0].start + 1);
return retval;
}
@@ -219,9 +209,6 @@ void usb_hcd_au1xxx_remove (struct usb_h
hcd->driver->hcd_free (hcd);
au1xxx_stop_hc(dev);
- release_mem_region(dev->resource[0].start,
- dev->resource[0].end
- - dev->resource[0].start + 1);
}
/*-------------------------------------------------------------------------*/
next reply other threads:[~2004-10-14 19:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-14 19:45 Karl Lessard [this message]
2004-10-15 16:54 ` Duplicated allocation in AU1xxx OHCI driver Matt Porter
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=416ED763.2090501@sunrisetelecom.com \
--to=klessard@sunrisetelecom.com \
--cc=linux-mips@linux-mips.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: link
Be 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.