the long overdue pcmcia_ioctl.c removal
Subsystems (2)
PATCH 1/1 the long overdue pcmcia_ioctl.c removal
pcmcia_ioctl.c was scheduled for removal in 2005, and it has a deprecation printk() since 2005 (sic).
This patch contains the long overdue removal and the cleanups that are now possible.
---
Documentation/feature-removal-schedule.txt | 17 drivers/pcmcia/Kconfig | 14 drivers/pcmcia/Makefile | 1 drivers/pcmcia/cs.c | 17 drivers/pcmcia/cs_internal.h | 3 drivers/pcmcia/ds.c | 28 drivers/pcmcia/ds_internal.h | 17 drivers/pcmcia/pcmcia_ioctl.c | 806 --------------------- drivers/pcmcia/pcmcia_resource.c | 15 drivers/pcmcia/rsrc_mgr.c | 80 -- include/pcmcia/cs.h | 1 include/pcmcia/ds.h | 85 -- include/pcmcia/ss.h | 7 13 files changed, 16 insertions(+), 1075 deletions(-)
25f87c367a7b15e5b9138bac2d5c35f7be0a1144 diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt index 7279595..4637bab 100644
Documentation/feature-removal-schedule.txt +0 -17
@@ -47,23 +47,6 @@ Who: Mauro Carvalho Chehab <[email protected]> --------------------------- -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: sys_sysctl When: September 2010 Option: CONFIG_SYSCTL_SYSCALL
drivers/pcmcia/Kconfig +0 -14
@@ -68,20 +68,6 @@ config PCMCIA_LOAD_CIS 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). - - If unsure, say Y. - config CARDBUS bool "32-bit CardBus support" depends on PCI
drivers/pcmcia/Makefile +0 -1
@@ -11,7 +11,6 @@ pcmcia_core-$(CONFIG_CARDBUS) += cardbus.o 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/cs.c +0 -17
@@ -296,23 +296,6 @@ void pcmcia_unregister_socket(struct pcmcia_socket *socket)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/cs_internal.h +0 -3
@@ -126,10 +126,7 @@ extern struct class_interface pccard_sysfs_interface;/* 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/ds.c +5 -23
@@ -56,7 +56,7 @@ module_param_named(pc_debug, ds_pc_debug, int, 0644); #define ds_dbg(lvl, fmt, arg...) do { } while (0)#endif -spinlock_t pcmcia_dev_list_lock; +static spinlock_t pcmcia_dev_list_lock;/*====================================================================*/
@@ -367,7 +367,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);
@@ -376,7 +376,7 @@ struct pcmcia_device * pcmcia_get_dev(struct pcmcia_device *p_dev)return 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);
@@ -643,7 +643,8 @@ static int pcmcia_device_query(struct pcmcia_device *p_dev)*/ 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;
@@ -1045,15 +1046,6 @@ static int pcmcia_bus_match(struct device * dev, struct device_driver * drv) { }spin_unlock (&p_drv->dynids.lock); -#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);
@@ -1400,13 +1392,11 @@ static int ds_event(struct pcmcia_socket *skt, event_t event, int priority)case 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 :
@@ -1417,7 +1407,6 @@ static int ds_event(struct pcmcia_socket *skt, event_t event, int priority)case CS_EVENT_RESET_PHYSICAL :case CS_EVENT_CARD_RESET :default : -handle_event (skt, event);break ; }
@@ -1479,9 +1468,6 @@ static int __devinit pcmcia_bus_add_socket(struct device *dev,*/ 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);memset (&socket->pcmcia_state,0 ,sizeof (u8));
@@ -1558,8 +1544,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
@@ -1568,8 +1552,6 @@ fs_initcall(init_pcmcia_bus); /* one level after subsys_initcall so that static void __exit exit_pcmcia_bus(void) { -pcmcia_cleanup_ioctl (); -class_interface_unregister (&pcmcia_bus_interface);bus_unregister (&pcmcia_bus_type);
drivers/pcmcia/ds_internal.h +0 -17
@@ -1,23 +1,6 @@/* 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_ioctl.c deleted +0 -806
806 lines not on this page · raw message
drivers/pcmcia/pcmcia_resource.c +10 -5
@@ -198,9 +198,9 @@ int pcmcia_access_configuration_register(struct pcmcia_device *p_dev,EXPORT_SYMBOL (pcmcia_access_configuration_register); -int pccard_get_configuration_info (struct pcmcia_socket *s, -struct pcmcia_device *p_dev, -config_info_t *config) +static int pccard_get_configuration_info (struct pcmcia_socket *s, +struct pcmcia_device *p_dev, +config_info_t *config) {config_t *c;
@@ -277,6 +277,7 @@ int pcmcia_get_configuration_info(struct pcmcia_device *p_dev,EXPORT_SYMBOL (pcmcia_get_configuration_info); +#if 0 /** pcmcia_get_window */ int pcmcia_get_window(struct pcmcia_socket *s, window_handle_t *handle,
@@ -309,6 +310,7 @@ int pcmcia_get_window(struct pcmcia_socket *s, window_handle_t *handle, return CS_SUCCESS; }/* pcmcia_get_window */ EXPORT_SYMBOL (pcmcia_get_window); +#endif /* 0 */ /** pccard_get_status
@@ -317,8 +319,9 @@ EXPORT_SYMBOL(pcmcia_get_window);* 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;
@@ -379,6 +382,7 @@ EXPORT_SYMBOL(pcmcia_get_status); +#if 0 /** pcmcia_get_mem_page * * Change the card address of an already open memory window.
@@ -392,6 +396,7 @@ int pcmcia_get_mem_page(window_handle_t win, memreq_t *req) return CS_SUCCESS; }/* pcmcia_get_mem_page */ EXPORT_SYMBOL (pcmcia_get_mem_page); +#endif /* 0 */ int pcmcia_map_mem_page (window_handle_t win,memreq_t *req)
drivers/pcmcia/rsrc_mgr.c +0 -80
86 lines not on this page · raw message
include/pcmcia/cs.h +0 -1
@@ -376,7 +376,6 @@ int pcmcia_get_configuration_info(struct pcmcia_device *p_dev, config_info_t *coint 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_release_window (window_handle_t win);
include/pcmcia/ds.h +1 -84
103 lines not on this page · raw message
include/pcmcia/ss.h +0 -7
@@ -271,10 +271,6 @@ struct pcmcia_socket {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) */
@@ -289,9 +285,6 @@ struct pcmcia_socket { }; -struct pcmcia_socket *pcmcia_get_socket_by_nr (unsigned int nr); - -extern void pcmcia_parse_events (struct pcmcia_socket *socket,unsigned int events);extern int pcmcia_register_socket (struct pcmcia_socket *socket);
Quoted 5 lines · On Wed, 13 Feb 2008 23:31:15 +0200 Adrian Bunk <[email protected]> wrote:
pcmcia_ioctl.cwas scheduled for removal in 2005, and it has a deprecationprintk()since 2005 (sic).This patch contains the long overdue removal and the cleanups that are now possible.
I've had this in -mm for ages, with a note that Dominik had a problem with it. Maybe there are subtleties here, dunno.
Quoted 10 lines · Andrew Morton
Quoted 5 lines · On Wed, 13 Feb 2008 23:31:15 +0200 Adrian Bunk <[email protected]> wrote:
pcmcia_ioctl.cwas scheduled for removal in 2005, and it has a deprecationprintk()since 2005 (sic).This patch contains the long overdue removal and the cleanups that are now possible.
I've had this in -mm for ages, with a note that Dominik had a problem with it. Maybe there are subtleties here, dunno.
This removal has bells and whistles and printk() since 2005...
Dominik, what exactly is the problem why we can't remove it now?
cu
Adrian
Signature · 4 lines
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon SeedQuoted 9 lines · Adrian Bunk
Quoted 8 lines · Andrew Morton
Quoted 5 lines · On Wed, 13 Feb 2008 23:31:15 +0200 Adrian Bunk <[email protected]> wrote:
pcmcia_ioctl.cwas scheduled for removal in 2005, and it has a deprecationprintk()since 2005 (sic).This patch contains the long overdue removal and the cleanups that are now possible.
Quoted 6 lines
Quoted 2 lines
I've had this in -mm for ages, with a note that Dominik had a problem with it. Maybe there are subtleties here, dunno.
This removal has bells and whistles and
printk()since 2005...Dominik, what exactly is the problem why we can't remove it now?
I've objected to it in the past because one of the machines I use every week requires the ioctls to be able to work - the rootfs is on a CF card and it uses an initrd to work out - at run time - whether it's supposed to be running off the CF card or some other internal memory.
Unfortunately, the project closed down, and I didn't have a chance (nor the bandwidth) to take a copy of the CVS, which means I've *NO* possibility to rebuild userspace - which effectively means I can't change it.
Therefore, removal of the PCMCIA ioctls effectively bars me from upgrading the kernel on this platform.
There are also other desktop GUI controls which talk to the kernel PCMCIA subsystem via ioctls - which fall into the same "I can't fix them" category - some of which are already broken through the removal of the PCMCIA version reporting IOCTL. Eg, it now thinks there's always a wireless card plugged in.
TBH I've given up trying to fight this continue "lets remove these IOCTLs which no one uses" crap. Obviously, _I_ use them.
Signature · 3 lines
Russell King Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/ maintainer of:
(Really cross-post like this?)
Quoted 2 lines · Russell King
TBH I've given up trying to fight this continue "lets remove these IOCTLs which no one uses" crap. Obviously, _I_ use them.
I suppose critical mass or other powers that be have decided they aren't good enough. If your userspace will never change, settling on a kernel as well shouldn't be too big a deal.
Closed source sure sucks.
//Peter
Quoted 11 lines · Peter Stuge
(Really cross-post like this?)
Quoted 2 lines · Russell King
TBH I've given up trying to fight this continue "lets remove these IOCTLs which no one uses" crap. Obviously, _I_ use them.
I suppose critical mass or other powers that be have decided they aren't good enough. If your userspace will never change, settling on a kernel as well shouldn't be too big a deal.
Closed source sure sucks.
It's not closed source, but a case of "the machine with the CVS on was taken down a couple of months after the project ended".
Signature · 3 lines
Russell King Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/ maintainer of: