summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH Hartley Sweeten <hsweeten@visionengravers.com>2013-01-30 23:44:25 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-02-04 01:27:36 (GMT)
commit112215012f42e2db1f7e2965e25936c4809e89b1 (patch)
tree73d18fbc214eef85067b65fd2ea76fcbccb08182
parent07c5b441de2caf7e12c5a3e6caf7ae536f2adc2f (diff)
downloadlinux-112215012f42e2db1f7e2965e25936c4809e89b1.tar.xz
staging: comedi: ni_daq_dio24: remove pcmcia_device private data
The private data, struct local_info_t, is not being used in the driver. Remove it as well as the kzalloc/kfree. Also, don't set the 'pcmcia_cur_dev' variable unless the pcmcia probe is successful. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/comedi/drivers/ni_daq_dio24.c19
1 files changed, 2 insertions, 17 deletions
diff --git a/drivers/staging/comedi/drivers/ni_daq_dio24.c b/drivers/staging/comedi/drivers/ni_daq_dio24.c
index 6cdf45e..826bea9 100644
--- a/drivers/staging/comedi/drivers/ni_daq_dio24.c
+++ b/drivers/staging/comedi/drivers/ni_daq_dio24.c
@@ -184,11 +184,6 @@ static void dio24_detach(struct comedi_device *dev)
free_irq(dev->irq, dev);
};
-struct local_info_t {
- struct pcmcia_device *link;
- struct bus_operations *bus;
-};
-
static int dio24_pcmcia_config_loop(struct pcmcia_device *p_dev,
void *priv_data)
{
@@ -200,17 +195,8 @@ static int dio24_pcmcia_config_loop(struct pcmcia_device *p_dev,
static int dio24_cs_attach(struct pcmcia_device *link)
{
- struct local_info_t *local;
int ret;
- local = kzalloc(sizeof(*local), GFP_KERNEL);
- if (!local)
- return -ENOMEM;
- local->link = link;
- link->priv = local;
-
- pcmcia_cur_dev = link;
-
link->config_flags |= CONF_ENABLE_IRQ | CONF_AUTO_AUDIO |
CONF_AUTO_SET_IO;
@@ -227,6 +213,8 @@ static int dio24_cs_attach(struct pcmcia_device *link)
if (ret)
goto failed;
+ pcmcia_cur_dev = link;
+
return 0;
failed:
@@ -237,9 +225,6 @@ failed:
static void dio24_cs_detach(struct pcmcia_device *link)
{
pcmcia_disable_device(link);
-
- /* This points to the parent local_info_t struct */
- kfree(link->priv);
}
static const struct pcmcia_device_id dio24_cs_ids[] = {