Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 354258
b: refs/heads/master
c: b2e1be0
h: refs/heads/master
v: v3
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Jan 30, 2013
1 parent 3d0588f commit 0fcf693
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 18 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fdcb5fdee2c7ec6327d08f4529da7e1130d0fa63
refs/heads/master: b2e1be03ac1747cbb758fa146fe5cf364f306420
19 changes: 2 additions & 17 deletions trunk/drivers/staging/comedi/drivers/ni_labpc_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,11 +154,6 @@ static int labpc_attach(struct comedi_device *dev, struct comedi_devconfig *it)
return labpc_common_attach(dev, iobase, irq, 0);
}

struct local_info_t {
struct pcmcia_device *link;
struct bus_operations *bus;
};

static int labpc_pcmcia_config_loop(struct pcmcia_device *p_dev,
void *priv_data)
{
Expand All @@ -170,17 +165,8 @@ static int labpc_pcmcia_config_loop(struct pcmcia_device *p_dev,

static int labpc_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_ENABLE_PULSE_IRQ |
CONF_AUTO_AUDIO | CONF_AUTO_SET_IO;

Expand All @@ -197,6 +183,8 @@ static int labpc_cs_attach(struct pcmcia_device *link)
if (ret)
goto failed;

pcmcia_cur_dev = link;

return 0;

failed:
Expand All @@ -207,9 +195,6 @@ static int labpc_cs_attach(struct pcmcia_device *link)
static void labpc_cs_detach(struct pcmcia_device *link)
{
pcmcia_disable_device(link);

/* This points to the parent local_info_t struct (may be null) */
kfree(link->priv);
}

static const struct pcmcia_device_id labpc_cs_ids[] = {
Expand Down

0 comments on commit 0fcf693

Please sign in to comment.