login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2007
»
October
»
22
Re: PCMCIA driver resource allocation
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
[view in full thread]
From: Bjorn Helgaas
Subject:
Re: PCMCIA driver resource allocation
Date: Monday, October 22, 2007 - 8:27 am
On Friday 19 October 2007 04:40:22 pm Russell King wrote:
quoted text
> On Fri, Oct 19, 2007 at 10:51:51AM -0600, Bjorn Helgaas wrote:
quoted text
> > + priv->io_resource = request_region(link->io.BasePort1, > > + link->io.NumPorts1, DRIVER_NAME); > > + if (!priv->io_resource) > > + goto cs_failed; > > mem = ioport_map(link->io.BasePort1, link->io.NumPorts1); > > if (!mem) > > goto cs_failed; > > @@ -366,6 +370,10 @@ > > pcmcia_disable_device(link); > > if (priv->hw.iobase) > > ioport_unmap(priv->hw.iobase); > > + if (priv->io_resource) { > > + release_resource(priv->io_resource); > > + priv->io_resource = NULL; > > Wrong function. release_resource() doesn't pair with request_region(). > request_region() allocates memory for the struct resource. > release_resource() merely removes the struct resource from the tree. > release_region() on the other hand removes the struct resource and > frees it.
Oh, thanks! I didn't notice that difference between release_region() and release_resource(). I'll fix the patch. Bjorn -
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
Messages in current thread:
PCMCIA driver resource allocation
, Bjorn Helgaas
, (Fri Oct 19, 9:51 am)
Re: PCMCIA driver resource allocation
, Russell King
, (Fri Oct 19, 3:40 pm)
Re: PCMCIA driver resource allocation
, Russell King
, (Sun Oct 21, 1:41 am)
Re: PCMCIA driver resource allocation
, Kristoffer Ericson
, (Sun Oct 21, 10:46 am)
Re: PCMCIA driver resource allocation
, Bjorn Helgaas
, (Mon Oct 22, 8:27 am)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Alan Cox
Re: Please add ZFS support (from GPL sources)
Trenton D. Adams
Re: Flash IO slow 1.5 MB/s
Ingo Molnar
Re: [PATCH] x86: silence section mismatch warning - uv_cpu_init
Mike Galbraith
Re: [RFC/RFT PATCH] sched: automated per tty task groups
Rafael J. Wysocki
[Bug #11287] Regression in 2.6.27-rc2 in acpi_processor_init()
git
:
Junio C Hamano
Re: git-svnimport
Johannes Schindelin
Re: [PATCH] Fix approxidate("never") to always return 0
A Large Angry SCM
Re: [RFC] origin link for cherry-pick and revert
Mark Burton
Re: Sporadic BSOD with msys git?
Junio C Hamano
Re: [PATCH] Detached HEAD (experimental)
linux-netdev
:
David Miller
Re: [RFC 0/5] generic rx recycling
Daniel Lezcano
getsockopt(TCP_DEFER_ACCEPT) value change
David Miller
Re: 2.6.27.18: bnx2/tg3: BUG: "scheduling while atomic" trying to ifenslave a seco...
Jeff Kirsher
[net-2.6 PATCH 2/5] e1000e: increase swflag acquisition timeout for ICHx/PCH
Gerrit Renker
[PATCH 37/37] dccp: Debugging functions for feature negotiation
git-commits-head
:
Linux Kernel Mailing List
ath9k_htc: Allocate URBs properly
Linux Kernel Mailing List
sm501: add power control callback
Linux Kernel Mailing List
net: don't grab a mutex within a timer context in gianfar
Linux Kernel Mailing List
powerpc/kexec: Add support for FSL-BookE
Linux Kernel Mailing List
V4L/DVB (8976): af9015: Add USB ID for AVerMedia A309
openbsd-misc
:
daniele.pilenga
snmpd hangs on 4.1 looking up hrSWRunTable
Christophe Rioux
Implementation example of snmp
Nick Holland
Re: booting openbsd on eee without cd-rom
Cabillot Julien
Re: OpenBSD isakmpd and pf vs Cisco PIX or ASA
Nice Daemon
Re: Bind ntpd on certain interface?
Colocation donated by:
Syndicate