aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/bluetooth/dtl1_cs.c
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2006-03-31 10:26:06 -0500
committerDominik Brodowski <linux@dominikbrodowski.net>2006-03-31 10:26:06 -0500
commit15b99ac1729503db9e6dc642a50b9b6cb3bf51f9 (patch)
treecfb8897487beba502aac2b28bc35066a87e34299 /drivers/bluetooth/dtl1_cs.c
parentfba395eee7d3f342ca739c20f5b3ee635d0420a0 (diff)
[PATCH] pcmcia: add return value to _config() functions
Most of the driver initialization isn't done in the .probe function, but in the internal _config() functions. Make them return a value, so that .probe can properly report whether the probing of the device succeeded or not. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/bluetooth/dtl1_cs.c')
-rw-r--r--drivers/bluetooth/dtl1_cs.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/bluetooth/dtl1_cs.c b/drivers/bluetooth/dtl1_cs.c
index 416433b4a348..0ec7fd4c9214 100644
--- a/drivers/bluetooth/dtl1_cs.c
+++ b/drivers/bluetooth/dtl1_cs.c
@@ -87,7 +87,7 @@ typedef struct dtl1_info_t {
87} dtl1_info_t; 87} dtl1_info_t;
88 88
89 89
90static void dtl1_config(struct pcmcia_device *link); 90static int dtl1_config(struct pcmcia_device *link);
91static void dtl1_release(struct pcmcia_device *link); 91static void dtl1_release(struct pcmcia_device *link);
92 92
93static void dtl1_detach(struct pcmcia_device *p_dev); 93static void dtl1_detach(struct pcmcia_device *p_dev);
@@ -555,7 +555,7 @@ static int dtl1_close(dtl1_info_t *info)
555 return 0; 555 return 0;
556} 556}
557 557
558static int dtl1_attach(struct pcmcia_device *link) 558static int dtl1_probe(struct pcmcia_device *link)
559{ 559{
560 dtl1_info_t *info; 560 dtl1_info_t *info;
561 561
@@ -579,9 +579,7 @@ static int dtl1_attach(struct pcmcia_device *link)
579 link->conf.IntType = INT_MEMORY_AND_IO; 579 link->conf.IntType = INT_MEMORY_AND_IO;
580 580
581 link->state |= DEV_PRESENT | DEV_CONFIG_PENDING; 581 link->state |= DEV_PRESENT | DEV_CONFIG_PENDING;
582 dtl1_config(link); 582 return dtl1_config(link);
583
584 return 0;
585} 583}
586 584
587 585
@@ -620,7 +618,7 @@ static int next_tuple(struct pcmcia_device *handle, tuple_t *tuple, cisparse_t *
620 return get_tuple(handle, tuple, parse); 618 return get_tuple(handle, tuple, parse);
621} 619}
622 620
623static void dtl1_config(struct pcmcia_device *link) 621static int dtl1_config(struct pcmcia_device *link)
624{ 622{
625 dtl1_info_t *info = link->priv; 623 dtl1_info_t *info = link->priv;
626 tuple_t tuple; 624 tuple_t tuple;
@@ -693,13 +691,14 @@ static void dtl1_config(struct pcmcia_device *link)
693 link->dev_node = &info->node; 691 link->dev_node = &info->node;
694 link->state &= ~DEV_CONFIG_PENDING; 692 link->state &= ~DEV_CONFIG_PENDING;
695 693
696 return; 694 return 0;
697 695
698cs_failed: 696cs_failed:
699 cs_error(link, last_fn, last_ret); 697 cs_error(link, last_fn, last_ret);
700 698
701failed: 699failed:
702 dtl1_release(link); 700 dtl1_release(link);
701 return -ENODEV;
703} 702}
704 703
705 704
@@ -727,7 +726,7 @@ static struct pcmcia_driver dtl1_driver = {
727 .drv = { 726 .drv = {
728 .name = "dtl1_cs", 727 .name = "dtl1_cs",
729 }, 728 },
730 .probe = dtl1_attach, 729 .probe = dtl1_probe,
731 .remove = dtl1_detach, 730 .remove = dtl1_detach,
732 .id_table = dtl1_ids, 731 .id_table = dtl1_ids,
733}; 732};