the overdue removal of drivers/pcmcia/pcmcia_ioctl.c
Subsystems (6)
RFC PATCH 1/1 the overdue removal of drivers/pcmcia/pcmcia_ioctl.c
This patch contains the overdue removal of drivers/pcmcia/pcmcia_ioctl.c plus additional cleanups possible after this removal.
---
Documentation/Changes | 18 Documentation/feature-removal-schedule.txt | 17 arch/m68k/Kconfig | 4 arch/sparc/Kconfig | 4 arch/sparc64/Kconfig | 4 drivers/net/Kconfig | 3 drivers/pcmcia/Kconfig | 16 drivers/pcmcia/Makefile | 1 drivers/pcmcia/cs.c | 17 drivers/pcmcia/cs_internal.h | 3 drivers/pcmcia/ds.c | 32 drivers/pcmcia/ds_internal.h | 19 drivers/pcmcia/pcmcia_ioctl.c | 802 --------------------- drivers/pcmcia/pcmcia_resource.c | 61 - drivers/pcmcia/rsrc_mgr.c | 80 -- drivers/pnp/pnpbios/Kconfig | 3 include/pcmcia/cs.h | 1 include/pcmcia/ds.h | 48 - include/pcmcia/ss.h | 6 scripts/ver_linux | 3 20 files changed, 22 insertions(+), 1120 deletions(-)
Documentation/feature-removal-schedule.txt renamed from Documentation/feature-removal-schedule.txt.old +0 -17
@@ -92,23 +92,6 @@ --------------------------- -What: PCMCIA control ioctl (needed for pcmcia-cs [cardmgr, cardctl]) -When: November 2005 -Files: drivers/pcmcia/: pcmcia_ioctl.c -Why: With the 16-bit PCMCIA subsystem now behaving (almost) like a - normal hotpluggable bus, and with it using the default kernel - infrastructure (hotplug, driver core, sysfs) keeping the PCMCIA - control ioctl needed by cardmgr and cardctl from pcmcia-cs is - unnecessary, and makes further cleanups and integration of the - PCMCIA subsystem into the Linux kernel device driver model more - difficult. The features provided by cardmgr and cardctl are either - handled by the kernel itself now or are available in the new - pcmciautils package available at - http://kernel.org/pub/linux/utils/kernel/pcmcia/ -Who: Dominik Brodowski <[email protected]> - ---------------------------- - What: ip_queue and ip6_queue (old ipv4-only and ipv6-only netfilter queue) When: December 2005 Why: This interface has been obsoleted by the new layer3-independent
drivers/pcmcia/Kconfig renamed from drivers/pcmcia/Kconfig.old +1 -15
@@ -65,21 +65,7 @@ to be loaded from userspace to work correctly. If you say Y here, and your userspace is arranged correctly, this will be loaded automatically using the in-kernel firmware loader and the hotplug - subsystem, instead of relying on cardmgr from pcmcia-cs to do so. - - If unsure, say Y. - -config PCMCIA_IOCTL - bool "PCMCIA control ioctl (obsolete)" - depends on PCMCIA - default y - help - If you say Y here, the deprecated ioctl interface to the PCMCIA - subsystem will be built. It is needed by cardmgr and cardctl - (pcmcia-cs) to function properly. - - You should use the new pcmciautils package instead (see - <file:Documentation/Changes> for location and details). + subsystem. If unsure, say Y.
include/pcmcia/ss.h renamed from include/pcmcia/ss.h.old +0 -6
@@ -272,10 +272,6 @@struct work_struct device_add;/* for adding further pseudo-multifunction * devices */ -#ifdef CONFIG_PCMCIA_IOCTL -struct user_info_t *user; -wait_queue_head_t queue; -#endif #endif /* cardbus (32-bit) */
@@ -290,8 +286,6 @@ }; -struct pcmcia_socket *pcmcia_get_socket_by_nr (unsigned int nr); -extern void pcmcia_parse_events (struct pcmcia_socket *socket,unsigned int events);
include/pcmcia/cs.h renamed from include/pcmcia/cs.h.old +0 -1
@@ -387,7 +387,6 @@int pcmcia_get_first_window (window_handle_t *win,win_req_t *req);int pcmcia_get_next_window (window_handle_t *win,win_req_t *req);int pcmcia_get_status (struct pcmcia_device *p_dev,cs_status_t *status); -int pcmcia_get_mem_page (window_handle_t win,memreq_t *req);int pcmcia_map_mem_page (window_handle_t win,memreq_t *req);int pcmcia_modify_configuration (struct pcmcia_device *p_dev,modconf_t *mod);int pcmcia_register_client (client_handle_t *handle,client_reg_t *req);
arch/m68k/Kconfig renamed from arch/m68k/Kconfig.old +1 -3
@@ -69,9 +69,7 @@ and the newer 32 bit CardBus cards. If you want to use CardBus cards, you need to say Y here and also to "CardBus support" below. - To use your PC-cards, you will need supporting software from David - Hinds' pcmcia-cs package (see the file <file:Documentation/Changes> - for location). Please also read the PCMCIA-HOWTO, available from + Please also read the PCMCIA-HOWTO, available from <http://www.tldp.org/docs.html#howto>. To compile this driver as modules, choose M here: the
arch/sparc/Kconfig renamed from arch/sparc/Kconfig.old +1 -3
@@ -97,9 +97,7 @@ and the newer 32 bit CardBus cards. If you want to use CardBus cards, you need to say Y here and also to "CardBus support" below. - To use your PC-cards, you will need supporting software from David - Hinds' pcmcia-cs package (see the file <file:Documentation/Changes> - for location). Please also read the PCMCIA-HOWTO, available from + Please also read the PCMCIA-HOWTO, available from <http://www.tldp.org/docs.html#howto>. To compile this driver as modules, choose M here: the
arch/sparc64/Kconfig renamed from arch/sparc64/Kconfig.old +1 -3
@@ -241,9 +241,7 @@ and the newer 32 bit CardBus cards. If you want to use CardBus cards, you need to say Y here and also to "CardBus support" below. - To use your PC-cards, you will need supporting software from David - Hinds' pcmcia-cs package (see the file <file:Documentation/Changes> - for location). Please also read the PCMCIA-HOWTO, available from + Please also read the PCMCIA-HOWTO, available from <http://www.tldp.org/docs.html#howto>. To compile this driver as modules, choose M here: the
Documentation/Changes renamed from Documentation/Changes.old +3 -15
@@ -204,17 +203,9 @@ PCMCIAutils ----------- -PCMCIAutils replaces pcmcia-cs (see below). It properly sets up -PCMCIA sockets at system startup and loads the appropriate modules -for 16-bit PCMCIA devices if the kernel is modularized and the hotplug -subsystem is used. - -Pcmcia-cs ---------- - -PCMCIA (PC Card) support is now partially implemented in the main -kernel source. The "pcmciautils" package (see above) replaces pcmcia-cs -for newest kernels. +PCMCIAutils replaces pcmcia-cs. It properly sets up PCMCIA sockets at +system startup and loads the appropriate modules for 16-bit PCMCIA +devices if the kernel is modularized and the hotplug subsystem is used. Quota-tools -----------
@@ -385,10 +376,6 @@ ----------- o <ftp://ftp.kernel.org/pub/linux/utils/kernel/pcmcia/> -Pcmcia-cs ---------- -o <http://pcmcia-cs.sourceforge.net/> - Quota-tools ---------- o <http://sourceforge.net/projects/linuxquota/>
drivers/net/Kconfig renamed from drivers/net/Kconfig.old +1 -2
@@ -1709,8 +1709,7 @@ If you want to plug a network (or some other) card into the PCMCIA (or PC-card) slot of your laptop instead (PCMCIA is the standard for credit card size extension cards used by all modern laptops), you - need the pcmcia-cs package (location contained in the file - <file:Documentation/Changes>) and you can say N here. + can say N here. Laptop users should read the Linux Laptop home page at <http://www.linux-on-laptops.com/> or
drivers/pnp/pnpbios/Kconfig renamed from drivers/pnp/pnpbios/Kconfig.old +0 -3
@@ -34,9 +34,6 @@ Also some buggy systems will fault when accessing certain features in the PNPBIOS /proc interface (e.g. "boot" configs). - See the latest pcmcia-cs (stand-alone package) for a nice set of - PNPBIOS /proc interface tools (lspnp and setpnp). - Unless you are debugging or have other specific reasons, it is recommended that you say N here.
scripts/ver_linux renamed from scripts/ver_linux.old +0 -3
@@ -48,9 +48,6 @@ xfs_db -V 2>&1 | grep version | awk \ 'NR==1{print "xfsprogs ", $3}' -cardmgr -V 2>&1| grep version | awk \ -'NR==1{print "pcmcia-cs ", $3}' - quota -V 2>&1 | grep version | awk \ 'NR==1{print "quota-tools ", $NF}'
drivers/pcmcia/Makefile renamed from drivers/pcmcia/Makefile.old +0 -1
@@ -11,7 +11,6 @@ obj-$(CONFIG_PCCARD) += pcmcia_core.o pcmcia-y += ds.o pcmcia_resource.o -pcmcia-$(CONFIG_PCMCIA_IOCTL) += pcmcia_ioctl.o obj-$(CONFIG_PCMCIA) += pcmcia.o obj-$(CONFIG_PCCARD_NONSTATIC) += rsrc_nonstatic.o
drivers/pcmcia/rsrc_mgr.c renamed from drivers/pcmcia/rsrc_mgr.c.old +0 -80
86 lines not on this page · raw message
drivers/pcmcia/cs_internal.h renamed from drivers/pcmcia/cs_internal.h.old +0 -3
@@ -126,10 +126,7 @@/* In cs.c */ extern struct rw_semaphore pcmcia_socket_list_rwsem;extern struct list_head pcmcia_socket_list; -int pcmcia_get_window (struct pcmcia_socket *s,window_handle_t *handle,int idx,win_req_t *req); -int pccard_get_configuration_info (struct pcmcia_socket *s,struct pcmcia_device *p_dev,config_info_t *config);int pccard_reset_card (struct pcmcia_socket *skt); -int pccard_get_status (struct pcmcia_socket *s,struct pcmcia_device *p_dev,cs_status_t *status);struct pcmcia_callback {
drivers/pcmcia/cs.c renamed from drivers/pcmcia/cs.c.old +0 -17
@@ -291,23 +291,6 @@EXPORT_SYMBOL (pcmcia_unregister_socket); -struct pcmcia_socket *pcmcia_get_socket_by_nr (unsigned int nr) -{ -struct pcmcia_socket *s; - -down_read (&pcmcia_socket_list_rwsem); -list_for_each_entry (s, &pcmcia_socket_list, socket_list) -if (s->sock == nr) { -up_read (&pcmcia_socket_list_rwsem); -return s; - } -up_read (&pcmcia_socket_list_rwsem); - -return NULL ; - -} -EXPORT_SYMBOL (pcmcia_get_socket_by_nr); -/** * The central event handler. Send_event() sends an event to the * 16-bit subsystem, which then calls the relevant device drivers.
drivers/pcmcia/pcmcia_resource.c renamed from drivers/pcmcia/pcmcia_resource.c.old +3 -52
73 lines not on this page · raw message
drivers/pcmcia/ds_internal.h renamed from drivers/pcmcia/ds_internal.h.old +0 -19
@@ -1,23 +1,4 @@/* ds_internal.h - internal header for 16-bit PCMCIA devices management */ -extern spinlock_t pcmcia_dev_list_lock; -extern struct bus_type pcmcia_bus_type; - -extern struct pcmcia_device *pcmcia_get_dev (struct pcmcia_device *p_dev); -extern void pcmcia_put_dev (struct pcmcia_device *p_dev); - -struct pcmcia_device *pcmcia_device_add (struct pcmcia_socket *s,unsigned int function); -extern int pcmcia_release_configuration (struct pcmcia_device *p_dev); -#ifdef CONFIG_PCMCIA_IOCTL -extern void __init pcmcia_setup_ioctl (void ); -extern void __exit pcmcia_cleanup_ioctl(void); -extern void handle_event (struct pcmcia_socket *s,event_t event); -extern int handle_request (struct pcmcia_socket *s,event_t event); -#else -static inline void __init pcmcia_setup_ioctl (void ) {return ; } -static inline void __exit pcmcia_cleanup_ioctl(void) { return; } -static inline void handle_event (struct pcmcia_socket *s,event_t event) {return ; } -static inline int handle_request (struct pcmcia_socket *s,event_t event) {return CS_SUCCESS ; } -#endif
drivers/pcmcia/pcmcia_resource.c renamed from drivers/pcmcia/pcmcia_resource.c.old +3 -2
@@ -271,8 +271,9 @@* SocketState yet: I haven't seen any point for it. */ -int pccard_get_status (struct pcmcia_socket *s,struct pcmcia_device *p_dev, -cs_status_t *status) +static int pccard_get_status (struct pcmcia_socket *s, +struct pcmcia_device *p_dev, +cs_status_t *status) {config_t *c;int val;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
drivers/pcmcia/pcmcia_ioctl.c deleted +0 -802
802 lines not on this page · raw message
include/pcmcia/ds.h renamed from include/pcmcia/ds.h.old +0 -48
60 lines not on this page · raw message
drivers/pcmcia/ds.c renamed from drivers/pcmcia/ds.c.old +8 -24
@@ -55,7 +55,9 @@ module_param_named(pc_debug, ds_pc_debug #define ds_dbg(lvl, fmt, arg...) do { } while (0)#endif -spinlock_t pcmcia_dev_list_lock; +static spinlock_t pcmcia_dev_list_lock; + +static struct bus_type pcmcia_bus_type;/*====================================================================*/
@@ -269,7 +271,7 @@ EXPORT_SYMBOL(pcmcia_unregister_driver);/* pcmcia_device handling */ -struct pcmcia_device *pcmcia_get_dev (struct pcmcia_device *p_dev) +static struct pcmcia_device *pcmcia_get_dev (struct pcmcia_device *p_dev) {struct device *tmp_dev; tmp_dev =get_device (&p_dev->dev);
@@ -278,7 +280,7 @@ struct pcmcia_device * pcmcia_get_dev(streturn to_pcmcia_dev (tmp_dev); } -void pcmcia_put_dev (struct pcmcia_device *p_dev) +static void pcmcia_put_dev (struct pcmcia_device *p_dev) {if (p_dev)put_device (&p_dev->dev);
@@ -545,7 +547,8 @@ static int pcmcia_device_query(struct pc*/ static DEFINE_MUTEX (device_add_lock); -struct pcmcia_device *pcmcia_device_add (struct pcmcia_socket *s,unsigned int function) +static struct pcmcia_device *pcmcia_device_add (struct pcmcia_socket *s, +unsigned int function) {struct pcmcia_device *p_dev, *tmp_dev;unsigned long flags;
@@ -927,15 +930,6 @@ static int pcmcia_bus_match(struct devicstruct pcmcia_driver * p_drv =to_pcmcia_drv (drv);struct pcmcia_device_id *did = p_drv->id_table; -#ifdef CONFIG_PCMCIA_IOCTL -/* matching by cardmgr */ -if (p_dev->cardmgr == p_drv) { -ds_dbg (0 ,"cardmgr matched %s to %s\n" , dev->bus_id, - drv->name); -return 1 ; - } -#endif -while (did && did->match_flags) {ds_dbg (3 ,"trying to match %s to %s\n" , dev->bus_id, drv->name);
@@ -1266,13 +1260,11 @@ static int ds_event(struct pcmcia_socketcase CS_EVENT_CARD_REMOVAL : s->pcmcia_state.present =0 ;pcmcia_card_remove (skt,NULL ); -handle_event (skt, event);break ;case CS_EVENT_CARD_INSERTION : s->pcmcia_state.present =1 ;pcmcia_card_add (skt); -handle_event (skt, event);break ;case CS_EVENT_EJECTION_REQUEST :
@@ -1283,7 +1275,6 @@ static int ds_event(struct pcmcia_socketcase CS_EVENT_RESET_PHYSICAL :case CS_EVENT_CARD_RESET :default : -handle_event (skt, event);break ; }
@@ -1345,9 +1336,6 @@ static int __devinit pcmcia_bus_add_sock*/ msleep (250 ); -#ifdef CONFIG_PCMCIA_IOCTL -init_waitqueue_head (&socket->queue); -#endif INIT_LIST_HEAD (&socket->devices_list);INIT_WORK (&socket->device_add, pcmcia_delayed_add_device, socket);memset (&socket->pcmcia_state,0 ,sizeof (u8));
@@ -1388,7 +1376,7 @@ static struct class_interface pcmcia_bus }; -struct bus_type pcmcia_bus_type = { +static struct bus_type pcmcia_bus_type = { .name ="pcmcia" , .uevent = pcmcia_bus_uevent, .match = pcmcia_bus_match,
@@ -1419,8 +1407,6 @@ static int __init init_pcmcia_bus(void)return ret; } -pcmcia_setup_ioctl (); -return 0 ; }fs_initcall (init_pcmcia_bus);/* one level after subsys_initcall so that
@@ -1429,8 +1415,6 @@ fs_initcall(init_pcmcia_bus); /* one lev static void __exit exit_pcmcia_bus(void) { -pcmcia_cleanup_ioctl (); -class_interface_unregister (&pcmcia_bus_interface);bus_unregister (&pcmcia_bus_type);
Quoted 2 lines · Adrian Bunk
This patch contains the overdue removal of
drivers/pcmcia/pcmcia_ioctl.cplus additional cleanups possible after this removal.
There are still systems around which (a) use cardmgr rather than the new pcmcia utils, and (b) applications make direct ioctl calls to the kernel PCMCIA layer external to the pcmcia-cs packages.
Like it or not, the PCMCIA ioctls are a well-established API.
Signature · 3 lines
Russell King Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/ maintainer of: 2.6 Serial core