Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
24fa0ecb
Commit
24fa0ecb
authored
May 11, 2003
by
Christoph Hellwig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ISDN: [PATCH] switch pcmcia isdn drivers to pcmcia_register_driver
And fix two unchecked kmallocs in avma1_cs.
parent
b09f333a
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
72 additions
and
68 deletions
+72
-68
drivers/isdn/hardware/avm/avm_cs.c
drivers/isdn/hardware/avm/avm_cs.c
+17
-16
drivers/isdn/hisax/avma1_cs.c
drivers/isdn/hisax/avma1_cs.c
+23
-17
drivers/isdn/hisax/elsa_cs.c
drivers/isdn/hisax/elsa_cs.c
+14
-15
drivers/isdn/hisax/sedlbauer_cs.c
drivers/isdn/hisax/sedlbauer_cs.c
+18
-20
No files found.
drivers/isdn/hardware/avm/avm_cs.c
View file @
24fa0ecb
...
...
@@ -510,24 +510,25 @@ static int avmcs_event(event_t event, int priority,
return
0
;
}
/* avmcs_event */
/*====================================================================*/
static
struct
pcmcia_driver
avmcs_driver
=
{
.
owner
=
THIS_MODULE
,
.
drv
=
{
.
name
=
"avmcs_cs"
,
},
.
attach
=
avmcs_attach
,
.
detach
=
avmcs_detach
,
};
static
int
__init
avmcs_init
(
void
)
{
servinfo_t
serv
;
CardServices
(
GetCardServicesInfo
,
&
serv
);
if
(
serv
.
Revision
!=
CS_RELEASE_CODE
)
{
printk
(
KERN_NOTICE
"avm_cs: Card Services release "
"does not match!
\n
"
);
return
-
1
;
}
register_pccard_driver
(
&
dev_info
,
&
avmcs_attach
,
&
avmcs_detach
);
return
0
;
return
pcmcia_register_driver
(
&
avmcs_driver
);
}
static
void
__exit
avmcs_exit
(
void
)
{
unregister_pccard_driver
(
&
dev_info
);
pcmcia_unregister_driver
(
&
avmcs_driver
);
/* XXX: this really needs to move into generic code.. */
while
(
dev_list
!=
NULL
)
{
if
(
dev_list
->
state
&
DEV_CONFIG
)
avmcs_release
((
u_long
)
dev_list
);
...
...
drivers/isdn/hisax/avma1_cs.c
View file @
24fa0ecb
...
...
@@ -153,6 +153,8 @@ static dev_link_t *avma1cs_attach(void)
/* Initialize the dev_link_t structure */
link
=
kmalloc
(
sizeof
(
struct
dev_link_t
),
GFP_KERNEL
);
if
(
!
link
)
return
NULL
;
memset
(
link
,
0
,
sizeof
(
struct
dev_link_t
));
link
->
release
.
function
=
&
avma1cs_release
;
link
->
release
.
data
=
(
u_long
)
link
;
...
...
@@ -186,6 +188,10 @@ static dev_link_t *avma1cs_attach(void)
/* Allocate space for private device-specific data */
local
=
kmalloc
(
sizeof
(
local_info_t
),
GFP_KERNEL
);
if
(
!
local
)
{
kfree
(
link
);
return
NULL
;
}
memset
(
local
,
0
,
sizeof
(
local_info_t
));
link
->
priv
=
local
;
...
...
@@ -515,30 +521,30 @@ static int avma1cs_event(event_t event, int priority,
return
0
;
}
/* avma1cs_event */
/*====================================================================*/
static
struct
pcmcia_driver
avma1cs_driver
=
{
.
owner
=
THIS_MODULE
,
.
drv
=
{
.
name
=
"avma1_cs"
,
},
.
attach
=
avma1cs_attach
,
.
detach
=
avma1cs_detach
,
};
static
int
__init
init_avma1_cs
(
void
)
{
servinfo_t
serv
;
DEBUG
(
0
,
"%s
\n
"
,
version
);
CardServices
(
GetCardServicesInfo
,
&
serv
);
if
(
serv
.
Revision
!=
CS_RELEASE_CODE
)
{
printk
(
KERN_NOTICE
"avma1_cs: Card Services release "
"does not match!
\n
"
);
return
-
1
;
}
register_pccard_driver
(
&
dev_info
,
&
avma1cs_attach
,
&
avma1cs_detach
);
return
0
;
return
pcmcia_register_driver
(
&
avma1cs_driver
);
}
static
void
__exit
exit_avma1_cs
(
void
)
{
DEBUG
(
0
,
"avma1_cs: unloading
\n
"
);
unregister_pccard_driver
(
&
dev_info
);
while
(
dev_list
!=
NULL
)
pcmcia_unregister_driver
(
&
avma1cs_driver
);
/* XXX: this really needs to move into generic code.. */
while
(
dev_list
!=
NULL
)
{
if
(
dev_list
->
state
&
DEV_CONFIG
)
avma1cs_release
((
u_long
)
dev_list
);
avma1cs_detach
(
dev_list
);
}
}
module_init
(
init_avma1_cs
);
...
...
drivers/isdn/hisax/elsa_cs.c
View file @
24fa0ecb
...
...
@@ -531,26 +531,25 @@ static int elsa_cs_event(event_t event, int priority,
return
0
;
}
/* elsa_cs_event */
/*====================================================================*/
static
struct
pcmcia_driver
elsa_cs_driver
=
{
.
owner
=
THIS_MODULE
,
.
drv
=
{
.
name
=
"elsa_cs"
,
},
.
attach
=
elsa_cs_attach
,
.
detach
=
elsa_cs_detach
,
};
static
int
__init
init_elsa_cs
(
void
)
{
servinfo_t
serv
;
DEBUG
(
0
,
"%s
\n
"
,
version
);
CardServices
(
GetCardServicesInfo
,
&
serv
);
if
(
serv
.
Revision
!=
CS_RELEASE_CODE
)
{
printk
(
KERN_NOTICE
"elsa_cs: Card Services release "
"does not match!
\n
"
);
return
-
1
;
}
register_pccard_driver
(
&
dev_info
,
&
elsa_cs_attach
,
&
elsa_cs_detach
);
return
0
;
return
pcmcia_register_driver
(
&
elsa_cs_driver
);
}
static
void
__exit
exit_elsa_cs
(
void
)
{
DEBUG
(
0
,
"elsa_cs: unloading
\n
"
);
unregister_pccard_driver
(
&
dev_info
);
pcmcia_unregister_driver
(
&
elsa_cs_driver
);
/* XXX: this really needs to move into generic code.. */
while
(
dev_list
!=
NULL
)
elsa_cs_detach
(
dev_list
);
}
...
...
drivers/isdn/hisax/sedlbauer_cs.c
View file @
24fa0ecb
...
...
@@ -633,26 +633,25 @@ static int sedlbauer_event(event_t event, int priority,
return
0
;
}
/* sedlbauer_event */
/*====================================================================*/
static
struct
pcmcia_driver
sedlbauer_driver
=
{
.
owner
=
THIS_MODULE
,
.
drv
=
{
.
name
=
"sedlbauer_cs"
,
},
.
attach
=
sedlbauer_attach
,
.
detach
=
sedlbauer_detach
,
};
static
int
__init
init_sedlbauer_cs
(
void
)
{
servinfo_t
serv
;
DEBUG
(
0
,
"%s
\n
"
,
version
);
CardServices
(
GetCardServicesInfo
,
&
serv
);
if
(
serv
.
Revision
!=
CS_RELEASE_CODE
)
{
printk
(
KERN_NOTICE
"sedlbauer_cs: Card Services release "
"does not match!
\n
"
);
return
-
1
;
}
register_pccard_driver
(
&
dev_info
,
&
sedlbauer_attach
,
&
sedlbauer_detach
);
return
0
;
return
pcmcia_register_driver
(
&
sedlbauer_driver
);
}
static
void
__exit
exit_sedlbauer_cs
(
void
)
{
DEBUG
(
0
,
"sedlbauer_cs: unloading
\n
"
);
unregister_pccard_driver
(
&
dev_info
);
pcmcia_unregister_driver
(
&
sedlbauer_driver
);
/* XXX: this really needs to move into generic code.. */
while
(
dev_list
!=
NULL
)
{
del_timer
(
&
dev_list
->
release
);
if
(
dev_list
->
state
&
DEV_CONFIG
)
...
...
@@ -663,4 +662,3 @@ static void __exit exit_sedlbauer_cs(void)
module_init
(
init_sedlbauer_cs
);
module_exit
(
exit_sedlbauer_cs
);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment