Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5716d415 authored by Dominik Brodowski's avatar Dominik Brodowski
Browse files

pcmcia: remove obsolete ioctl

parent b37fa16e
Loading
Loading
Loading
Loading
+0 −23
Original line number Diff line number Diff line
@@ -116,29 +116,6 @@ Who: Mauro Carvalho Chehab <mchehab@infradead.org>

---------------------------

What:	PCMCIA control ioctl (needed for pcmcia-cs [cardmgr, cardctl])
When:	2.6.35/2.6.36
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 potentially harmful (it does not provide for
	proper locking), 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/

	For all architectures except ARM, the associated config symbol
	has been removed from kernel 2.6.34; for ARM, it will be likely
	be removed from kernel 2.6.35. The actual code will then likely
	be removed from kernel 2.6.36.
Who:	Dominik Brodowski <linux@dominikbrodowski.net>

---------------------------

What:	sys_sysctl
When:	September 2010
Option: CONFIG_SYSCTL_SYSCALL
+0 −1
Original line number Diff line number Diff line
@@ -7,7 +7,6 @@ pcmcia_core-$(CONFIG_CARDBUS) += cardbus.o
obj-$(CONFIG_PCCARD)				+= pcmcia_core.o

pcmcia-y					+= ds.o pcmcia_resource.o cistpl.o pcmcia_cis.o
pcmcia-$(CONFIG_PCMCIA_IOCTL)			+= pcmcia_ioctl.o
obj-$(CONFIG_PCMCIA)				+= pcmcia.o

pcmcia_rsrc-y					+= rsrc_mgr.o
+2 −38
Original line number Diff line number Diff line
@@ -60,14 +60,6 @@ struct pccard_resource_ops {
	struct resource* (*find_mem)	(unsigned long base, unsigned long num,
					 unsigned long align, int low,
					 struct pcmcia_socket *s);
	int	(*add_io)		(struct pcmcia_socket *s,
					 unsigned int action,
					 unsigned long r_start,
					 unsigned long r_end);
	int	(*add_mem)		(struct pcmcia_socket *s,
					 unsigned int action,
					 unsigned long r_start,
					 unsigned long r_end);
	int	(*init)			(struct pcmcia_socket *s);
	void	(*exit)			(struct pcmcia_socket *s);
};
@@ -146,6 +138,8 @@ void pcmcia_put_socket(struct pcmcia_socket *skt);
/* ds.c */
extern struct bus_type pcmcia_bus_type;

struct pcmcia_device;

/* pcmcia_resource.c */
extern int pcmcia_release_configuration(struct pcmcia_device *p_dev);
extern int pcmcia_validate_mem(struct pcmcia_socket *s);
@@ -188,34 +182,4 @@ int pccard_get_next_tuple(struct pcmcia_socket *s, unsigned int function,

int pccard_get_tuple_data(struct pcmcia_socket *s, tuple_t *tuple);


#ifdef CONFIG_PCMCIA_IOCTL
/* ds.c */
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);

/* pcmcia_ioctl.c */
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 /* CONFIG_PCMCIA_IOCTL */

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 0;
}

#endif /* CONFIG_PCMCIA_IOCTL */

#endif /* _LINUX_CS_INTERNAL_H */
+4 −22
Original line number Diff line number Diff line
@@ -213,7 +213,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);
@@ -222,7 +222,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);
@@ -477,7 +477,8 @@ static int pcmcia_device_query(struct pcmcia_device *p_dev)
}


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;
	int i;
@@ -885,14 +886,6 @@ static int pcmcia_bus_match(struct device *dev, struct device_driver *drv)
	}
	mutex_unlock(&p_drv->dynids.lock);

#ifdef CONFIG_PCMCIA_IOCTL
	/* matching by cardmgr */
	if (p_dev->cardmgr == p_drv) {
		dev_dbg(dev, "cardmgr matched to %s\n", drv->name);
		return 1;
	}
#endif

	while (did && did->match_flags) {
		dev_dbg(dev, "trying to match to %s\n", drv->name);
		if (pcmcia_devmatch(p_dev, did)) {
@@ -1245,7 +1238,6 @@ static int ds_event(struct pcmcia_socket *skt, event_t event, int priority)
	case CS_EVENT_CARD_REMOVAL:
		atomic_set(&skt->present, 0);
		pcmcia_card_remove(skt, NULL);
		handle_event(skt, event);
		mutex_lock(&s->ops_mutex);
		destroy_cis_cache(s);
		pcmcia_cleanup_irq(s);
@@ -1259,7 +1251,6 @@ static int ds_event(struct pcmcia_socket *skt, event_t event, int priority)
		destroy_cis_cache(s); /* to be on the safe side... */
		mutex_unlock(&s->ops_mutex);
		pcmcia_card_add(skt);
		handle_event(skt, event);
		break;

	case CS_EVENT_EJECTION_REQUEST:
@@ -1280,14 +1271,12 @@ static int ds_event(struct pcmcia_socket *skt, event_t event, int priority)
			ds_event(skt, CS_EVENT_CARD_INSERTION,
				 CS_EVENT_PRI_LOW);
		}
		handle_event(skt, event);
		break;

	case CS_EVENT_PM_SUSPEND:
	case CS_EVENT_RESET_PHYSICAL:
	case CS_EVENT_CARD_RESET:
	default:
		handle_event(skt, event);
		break;
    }

@@ -1350,9 +1339,6 @@ static int __devinit pcmcia_bus_add_socket(struct device *dev,
		return ret;
	}

#ifdef CONFIG_PCMCIA_IOCTL
	init_waitqueue_head(&socket->queue);
#endif
	INIT_LIST_HEAD(&socket->devices_list);
	memset(&socket->pcmcia_state, 0, sizeof(u8));
	socket->device_count = 0;
@@ -1429,8 +1415,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
@@ -1439,8 +1423,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/pcmcia_ioctl.c

deleted100644 → 0
+0 −1077

File deleted.

Preview size limit exceeded, changes collapsed.

Loading