aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/bluetooth/bluecard_cs.c
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2006-03-31 10:21:06 -0500
committerDominik Brodowski <linux@dominikbrodowski.net>2006-03-31 10:21:06 -0500
commitfba395eee7d3f342ca739c20f5b3ee635d0420a0 (patch)
tree5a73f68d3514aa795b0d8c500e4d72170651d762 /drivers/bluetooth/bluecard_cs.c
parentfd238232cd0ff4840ae6946bb338502154096d88 (diff)
[PATCH] pcmcia: remove dev_link_t and client_handle_t indirection
dev_link_t * and client_handle_t both mean struct pcmcai_device * by now. Therefore, remove all such indirections. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/bluetooth/bluecard_cs.c')
-rw-r--r--drivers/bluetooth/bluecard_cs.c37
1 files changed, 17 insertions, 20 deletions
diff --git a/drivers/bluetooth/bluecard_cs.c b/drivers/bluetooth/bluecard_cs.c
index b461411eab3e..e557f2359ccc 100644
--- a/drivers/bluetooth/bluecard_cs.c
+++ b/drivers/bluetooth/bluecard_cs.c
@@ -85,8 +85,8 @@ typedef struct bluecard_info_t {
85} bluecard_info_t; 85} bluecard_info_t;
86 86
87 87
88static void bluecard_config(dev_link_t *link); 88static void bluecard_config(struct pcmcia_device *link);
89static void bluecard_release(dev_link_t *link); 89static void bluecard_release(struct pcmcia_device *link);
90 90
91static void bluecard_detach(struct pcmcia_device *p_dev); 91static void bluecard_detach(struct pcmcia_device *p_dev);
92 92
@@ -856,17 +856,16 @@ static int bluecard_close(bluecard_info_t *info)
856 return 0; 856 return 0;
857} 857}
858 858
859static int bluecard_attach(struct pcmcia_device *p_dev) 859static int bluecard_attach(struct pcmcia_device *link)
860{ 860{
861 bluecard_info_t *info; 861 bluecard_info_t *info;
862 dev_link_t *link = dev_to_instance(p_dev);
863 862
864 /* Create new info device */ 863 /* Create new info device */
865 info = kzalloc(sizeof(*info), GFP_KERNEL); 864 info = kzalloc(sizeof(*info), GFP_KERNEL);
866 if (!info) 865 if (!info)
867 return -ENOMEM; 866 return -ENOMEM;
868 867
869 info->p_dev = p_dev; 868 info->p_dev = link;
870 link->priv = info; 869 link->priv = info;
871 870
872 link->io.Attributes1 = IO_DATA_PATH_WIDTH_8; 871 link->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
@@ -887,9 +886,8 @@ static int bluecard_attach(struct pcmcia_device *p_dev)
887} 886}
888 887
889 888
890static void bluecard_detach(struct pcmcia_device *p_dev) 889static void bluecard_detach(struct pcmcia_device *link)
891{ 890{
892 dev_link_t *link = dev_to_instance(p_dev);
893 bluecard_info_t *info = link->priv; 891 bluecard_info_t *info = link->priv;
894 892
895 if (link->state & DEV_CONFIG) 893 if (link->state & DEV_CONFIG)
@@ -899,7 +897,7 @@ static void bluecard_detach(struct pcmcia_device *p_dev)
899} 897}
900 898
901 899
902static int first_tuple(client_handle_t handle, tuple_t *tuple, cisparse_t *parse) 900static int first_tuple(struct pcmcia_device *handle, tuple_t *tuple, cisparse_t *parse)
903{ 901{
904 int i; 902 int i;
905 903
@@ -914,9 +912,8 @@ static int first_tuple(client_handle_t handle, tuple_t *tuple, cisparse_t *parse
914 return pcmcia_parse_tuple(handle, tuple, parse); 912 return pcmcia_parse_tuple(handle, tuple, parse);
915} 913}
916 914
917static void bluecard_config(dev_link_t *link) 915static void bluecard_config(struct pcmcia_device *link)
918{ 916{
919 client_handle_t handle = link->handle;
920 bluecard_info_t *info = link->priv; 917 bluecard_info_t *info = link->priv;
921 tuple_t tuple; 918 tuple_t tuple;
922 u_short buf[256]; 919 u_short buf[256];
@@ -930,7 +927,7 @@ static void bluecard_config(dev_link_t *link)
930 927
931 /* Get configuration register information */ 928 /* Get configuration register information */
932 tuple.DesiredTuple = CISTPL_CONFIG; 929 tuple.DesiredTuple = CISTPL_CONFIG;
933 last_ret = first_tuple(handle, &tuple, &parse); 930 last_ret = first_tuple(link, &tuple, &parse);
934 if (last_ret != CS_SUCCESS) { 931 if (last_ret != CS_SUCCESS) {
935 last_fn = ParseTuple; 932 last_fn = ParseTuple;
936 goto cs_failed; 933 goto cs_failed;
@@ -947,25 +944,25 @@ static void bluecard_config(dev_link_t *link)
947 944
948 for (n = 0; n < 0x400; n += 0x40) { 945 for (n = 0; n < 0x400; n += 0x40) {
949 link->io.BasePort1 = n ^ 0x300; 946 link->io.BasePort1 = n ^ 0x300;
950 i = pcmcia_request_io(link->handle, &link->io); 947 i = pcmcia_request_io(link, &link->io);
951 if (i == CS_SUCCESS) 948 if (i == CS_SUCCESS)
952 break; 949 break;
953 } 950 }
954 951
955 if (i != CS_SUCCESS) { 952 if (i != CS_SUCCESS) {
956 cs_error(link->handle, RequestIO, i); 953 cs_error(link, RequestIO, i);
957 goto failed; 954 goto failed;
958 } 955 }
959 956
960 i = pcmcia_request_irq(link->handle, &link->irq); 957 i = pcmcia_request_irq(link, &link->irq);
961 if (i != CS_SUCCESS) { 958 if (i != CS_SUCCESS) {
962 cs_error(link->handle, RequestIRQ, i); 959 cs_error(link, RequestIRQ, i);
963 link->irq.AssignedIRQ = 0; 960 link->irq.AssignedIRQ = 0;
964 } 961 }
965 962
966 i = pcmcia_request_configuration(link->handle, &link->conf); 963 i = pcmcia_request_configuration(link, &link->conf);
967 if (i != CS_SUCCESS) { 964 if (i != CS_SUCCESS) {
968 cs_error(link->handle, RequestConfiguration, i); 965 cs_error(link, RequestConfiguration, i);
969 goto failed; 966 goto failed;
970 } 967 }
971 968
@@ -979,14 +976,14 @@ static void bluecard_config(dev_link_t *link)
979 return; 976 return;
980 977
981cs_failed: 978cs_failed:
982 cs_error(link->handle, last_fn, last_ret); 979 cs_error(link, last_fn, last_ret);
983 980
984failed: 981failed:
985 bluecard_release(link); 982 bluecard_release(link);
986} 983}
987 984
988 985
989static void bluecard_release(dev_link_t *link) 986static void bluecard_release(struct pcmcia_device *link)
990{ 987{
991 bluecard_info_t *info = link->priv; 988 bluecard_info_t *info = link->priv;
992 989
@@ -995,7 +992,7 @@ static void bluecard_release(dev_link_t *link)
995 992
996 del_timer(&(info->timer)); 993 del_timer(&(info->timer));
997 994
998 pcmcia_disable_device(link->handle); 995 pcmcia_disable_device(link);
999} 996}
1000 997
1001static struct pcmcia_device_id bluecard_ids[] = { 998static struct pcmcia_device_id bluecard_ids[] = {