29 Nov, 2009
6 commits
-
Signed-off-by: Dominik Brodowski
-
pcmcia_get_window() and pcmcia_get_mem_page() were only called from
pcmcia_ioctl.c. Therefore, move these functions to that file, and
remove the useless EXPORTs.Signed-off-by: Dominik Brodowski
-
Logic changes based on top of the other patches:
This set of patches changed window_handle_t from being a pointer to an
unsigned long. The unsigned long is now a simple index into socket->win[].
Going from a pointer to unsigned long should leave the user space interface
unchanged unless I'm mistaken.This change results in code that is less error prone and a user space
interface which is much cleaner and safer. A nice side effect is that we
are also are able to remove all members except one from window_t.[ linux@dominikbrodowski.net:
Update to 2.6.31. Also, a plain "index" to socket->win[] does not
work, as several codepaths rely on "window_handle_t" being
non-zero if used. Therefore, set the window_handle_t to the
socket->win[] index + 1. ]CC: netdev@vger.kernel.org
Signed-off-by: Magnus Damm
Signed-off-by: Dominik Brodowski -
No logic changes, just pass struct pcmcia_socket to pcmcia_get_mem_page()
[linux@dominikbrodowski.net: update to 2.6.31]
Signed-off-by: Magnus Damm
Signed-off-by: Dominik Brodowski -
No logic changes, just pass struct pcmcia_device to pcmcia_map_mem_page()
[linux@dominikbrodowski.net: update to 2.6.31]
CC: netdev@vger.kernel.org
CC: linux-wireless@vger.kernel.org
CC: linux-scsi@vger.kernel.org
CC: Jiri Kosina
Acked-by: Karsten Keil (for ISDN)
Signed-off-by: Magnus Damm
Signed-off-by: Dominik Brodowski -
No logic changes, just pass struct pcmcia_device to pcmcia_release_window().
[linux@dominikbrodowski.net: update to 2.6.31]
CC: netdev@vger.kernel.org
CC: Jiri Kosina
Signed-off-by: Magnus Damm
Signed-off-by: Dominik Brodowski
22 Nov, 2009
1 commit
-
The result of calling kzalloc is never used or freed.
The semantic match that finds this problem is as follows:
(http://www.emn.fr/x-info/coccinelle/)//
@r exists@
local idexpression x;
statement S;
expression E;
identifier f,f1,l;
position p1,p2;
expression *ptr != NULL;
@@x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...);
...
if (x == NULL) S
}
(
x->f1 = E
|
(x->f1 == NULL || ...)
|
f(...,x->f1,...)
)
...>
(
return \(0\|\|ptr\);
|
return@p2 ...;
)@script:python@
p1 << r.p1;
p2 << r.p2;
@@print "* file: %s kmalloc %s return %s" % (p1[0].file,p1[0].line,p2[0].line)
//Signed-off-by: Julia Lawall
Signed-off-by: Dominik Brodowski
12 Nov, 2009
2 commits
-
Fix handling of Zoomed Video Registers in the Topic pcmcia controller
( http://bugzilla.kernel.org/show_bug.cgi?id=14581 ). The information
has been retrieved from the Topic manual which can be obtained from
Toshiba.The Zoomed Video is used with PCMCIA Cards like the Margi DVD-to-Go.
[linux@dominikbrodowski.net: whitespace & commit message fix]
Signed-off-by: Avi Cohen Stuart
Signed-off-by: Dominik Brodowski -
Fix printk format warnings on sizeof() [size_t] arguments.
drivers/char/pcmcia/cm4040_cs.c:267: warning: format '%lu' expects type 'long unsigned int', but argument 5 has type 'size_t'
drivers/char/pcmcia/cm4040_cs.c:272: warning: format '%lu' expects type 'long unsigned int', but argument 5 has type 'size_t'CC: Harald Welte
Signed-off-by: Randy Dunlap
Signed-off-by: Dominik Brodowski
09 Nov, 2009
31 commits
-
Attempt to load the "pcmcia" module for 16-bit PCMCIA cards, so that
PCMCIA support becomes available without pcmciautils/udev userspace
interaction. Based on a suggestion and a patch
Signed-off-by: Komuro
but converted it to request_module_nowait() and move it to a later
stage.Signed-off-by: Dominik Brodowski
-
Update comedi PCMCIA drivers to work with recent PCMCIA changes documented
in Documentation/pcmcia/driver-changes.txt:- use pcmcia_config_loop()
- don't use PCMCIA_DEBUG, but use dev_dbg()
- don't use cs_error()
- re-use prod_id and card_id values already storedAcked-by: Greg Kroah-Hartman
Signed-off-by: Dominik Brodowski -
skt->irq is a mere duplication of pcmcia_socket's pci_irq member.
Get rid of it.Signed-off-by: Russell King
Signed-off-by: Dominik Brodowski -
Signed-off-by: Russell King
Signed-off-by: Dominik Brodowski -
The 'dev' member is now only ever written, so we can safely remove it.
Signed-off-by: Russell King
Signed-off-by: Dominik Brodowski -
No one should modify the ops structure supplied to soc_pcmcia_socket
so make it const.Signed-off-by: Russell King
Signed-off-by: Dominik Brodowski -
Signed-off-by: Russell King
Signed-off-by: Dominik Brodowski -
Signed-off-by: Russell King
Signed-off-by: Dominik Brodowski -
Move the individual socket probing and initialization down into the
SoC specific support files, thereby allowing soc_common_drv_pcmcia_probe
to be eliminated. soc_common.c now no longer deals with distinct groups
of sockets.Signed-off-by: Russell King
Signed-off-by: Dominik Brodowski -
Mechanically transplant the removal code from soc_common into each
SoC specific base support file, thereby allowing
soc_common_drv_pcmcia_remove to be removed. No other changes.Signed-off-by: Russell King
Signed-off-by: Dominik Brodowski -
Factor out the functionality for adding and removing a single
socket, thereby allowing SoCs to individually register each
socket. The advantage of this approach is that SoCs can then
extend soc_pcmcia_socket as they wish.Signed-off-by: Russell King
Signed-off-by: Dominik Brodowski -
Convert soc_common.c to be a stand alone module, rather than wrapping
it up into the individual SoC specific base modules. In doing this,
we need to add init/exit functions for soc_common to register/remove
the cpufreq notifier.Signed-off-by: Russell King
Signed-off-by: Dominik Brodowski -
As suggested by Wolfram Sang , use dev_dbg(),
and dev_{err,warn,info}() in pd6729.c, and add some "\n" suggested by
Komuro . In the ISR, use pr_devel() and
dev_vdbg() as they are only compiled if DEBUG (or, for dev_vdbg(),
VERBOSE_DEBUG) are set explicitly.CC: Komuro
Acked-by: Wolfram Sang
Signed-off-by: Dominik Brodowski -
As all in-tree drivers have been converted to not use cs_error() any more,
drop these functions and definitions, and update the Documentation.Signed-off-by: Dominik Brodowski
-
Convert PCMCIA drivers to use the dynamic debug infrastructure, instead of
requiring manual settings of PCMCIA_DEBUG.Also, remove all usages of the CS_CHECK macro and replace them with proper
Linux style calling and return value checking. The extra error reporting may
be dropped, as the PCMCIA core already complains about any (non-driver-author)
errors.CC: linux-mtd@lists.infradead.org
CC: linux-usb@vger.kernel.org
Signed-off-by: Dominik Brodowski -
Convert PCMCIA drivers to use the dynamic debug infrastructure, instead of
requiring manual settings of PCMCIA_DEBUG.Also, remove all usages of the CS_CHECK macro and replace them with proper
Linux style calling and return value checking. The extra error reporting may
be dropped, as the PCMCIA core already complains about any (non-driver-author)
errors.CC: Jaroslav Kysela
CC: alsa-devel@alsa-project.org
Signed-off-by: Dominik Brodowski -
Convert PCMCIA drivers to use the dynamic debug infrastructure, instead of
requiring manual settings of PCMCIA_DEBUG.Also, remove all usages of the CS_CHECK macro and replace them with proper
Linux style calling and return value checking. The extra error reporting may
be dropped, as the PCMCIA core already complains about any (non-driver-author)
errors.CC: linux-serial@vger.kernel.org
CC: Russell King
Signed-off-by: Dominik Brodowski -
Convert PCMCIA drivers to use the dynamic debug infrastructure, instead of
requiring manual settings of PCMCIA_DEBUG.Also, remove all usages of the CS_CHECK macro and replace them with proper
Linux style calling and return value checking. The extra error reporting may
be dropped, as the PCMCIA core already complains about any (non-driver-author)
errors.CC: linux-scsi@vger.kernel.org
Signed-off-by: Dominik Brodowski -
Convert PCMCIA drivers to use the dynamic debug infrastructure, instead of
requiring manual settings of PCMCIA_DEBUG.Also, remove all usages of the CS_CHECK macro and replace them with proper
Linux style calling and return value checking. The extra error reporting may
be dropped, as the PCMCIA core already complains about any (non-driver-author)
errors.CC: linux-wireless@vger.kernel.org
CC: netdev@vger.kernel.org
Signed-off-by: Dominik Brodowski -
Convert PCMCIA drivers to use the dynamic debug infrastructure, instead of
requiring manual settings of PCMCIA_DEBUG.Also, remove all usages of the CS_CHECK macro and replace them with proper
Linux style calling and return value checking. The extra error reporting may
be dropped, as the PCMCIA core already complains about any (non-driver-author)
errors.CC: linux-wireless@vger.kernel.org
CC: netdev@vger.kernel.org
Signed-off-by: Dominik Brodowski -
Convert PCMCIA drivers to use the dynamic debug infrastructure, instead of
requiring manual settings of PCMCIA_DEBUG. Only some rare debug checks are
now hidden behind "#ifdef DEBUG" or "#if 0".Also, remove all usages of the CS_CHECK macro and replace them with proper
Linux style calling and return value checking. The extra error reporting may
be dropped, as the PCMCIA core already complains about any (non-driver-author)
errors.CC: netdev@vger.kernel.org
Signed-off-by: Dominik Brodowski -
Convert PCMCIA drivers to use the dynamic debug infrastructure, instead of
requiring manual settings of PCMCIA_DEBUG.Also, remove all usages of the CS_CHECK macro and replace them with proper
Linux style calling and return value checking. The extra error reporting may
be dropped, as the PCMCIA core already complains about any (non-driver-author)
errors.CC: Karsten Keil
Signed-off-by: Dominik Brodowski -
Convert PCMCIA drivers to use the dynamic debug infrastructure, instead of
requiring manual settings of PCMCIA_DEBUG. Only some rare extra debug checks
in cm4000_cs.c cm4040_cs.c are now hidden behind a "#ifdef CM4000_DEBUG"
or "#ifdef CM4040_DEBUG".Also, remove all usages of the CS_CHECK macro and replace them with proper
Linux style calling and return value checking. The extra error reporting may
be dropped, as the PCMCIA core already complains about any (non-driver-author)
errors.CC: Harald Welte
CC: Jiri Kosina
CC: David Sterba
Signed-off-by: Dominik Brodowski -
Remove all usages of the CS_CHECK macro and replace them with proper
Linux style calling and return value checking. The extra error reporting may
be dropped, as the PCMCIA core already complains about any (non-driver-author)
errors.CC: linux-bluetooth@vger.kernel.org
Signed-off-by: Dominik Brodowski -
ide-cs.c is the only PCMCIA device driver making use of CONFIG_PCMCIA_DEBUG,
so convert it to use the dynamic debug infrastructure.Also, remove all usages of the CS_CHECK macro and replace them with proper
Linux style calling and return value checking. The extra error reporting may
be dropped, as the PCMCIA core already complains about any (non-driver-author)
errors.CC: linux-ide@vger.kernel.org
Signed-off-by: Dominik Brodowski -
Add a few more error and debug messages to the PCMCIA core.
Signed-off-by: Dominik Brodowski
-
Make use of the dynamic debug infrastructure in various PCMCIA socket
drivers. By doing so, only the drivers relying on soc_common make use
of CONFIG_PCMCIA_DEBUG. Therefore, update the Kconfig entry accordingly.Signed-off-by: Dominik Brodowski
-
Use the generic "dynamic debug" infrastructure instead of
CONIG_PCMCIA_DEBUG in the PCMCIA core (pcmcia.ko and pcmcia_core.ko). To
enable debugging, enable CONFIG_DYNAMIC_DEBUG, mount debugfs and$ echo -n 'module pcmcia_core +p' > /sys/kernel/debug/dynamic_debug/control
for the complete module "pcmcia_core", for example. For more detailled
instructions, please see Documentation/dynamic-debug-howto.txtSigned-off-by: Dominik Brodowski
-
Remove the pcmcia_get_{first,next}_tuple() calls no longer needed by
(current) pcmcia device drivers.Signed-off-by: Dominik Brodowski
-
Convert the (broken) pcmciamtd driver to use the new CIS helpers.
CC: David.Woodhouse@intel.com
CC: linux-mtd@lists.infradead.org
Signed-off-by: Dominik Brodowski -
SSB is a prime example of how to make use of the new CIS helpers.
CC: Michael Buesch
Acked-by: John W. Linville
Signed-off-by: Dominik Brodowski