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
nexedi
linux
Commits
edad54dc
Commit
edad54dc
authored
Mar 27, 2003
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Merge
bk://bk.arm.linux.org.uk/linux-2.5-pcmcia
into home.transmeta.com:/home/torvalds/v2.5/linux
parents
4f1c0880
de1e5963
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
34 deletions
+13
-34
drivers/pcmcia/ds.c
drivers/pcmcia/ds.c
+13
-34
No files found.
drivers/pcmcia/ds.c
View file @
edad54dc
...
@@ -71,8 +71,6 @@ MODULE_LICENSE("Dual MPL/GPL");
...
@@ -71,8 +71,6 @@ MODULE_LICENSE("Dual MPL/GPL");
#ifdef PCMCIA_DEBUG
#ifdef PCMCIA_DEBUG
INT_MODULE_PARM
(
pc_debug
,
PCMCIA_DEBUG
);
INT_MODULE_PARM
(
pc_debug
,
PCMCIA_DEBUG
);
#define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args)
#define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args)
static
const
char
*
version
=
"ds.c 1.112 2001/10/13 00:08:28 (David Hinds)"
;
#else
#else
#define DEBUG(n, args...)
#define DEBUG(n, args...)
#endif
#endif
...
@@ -188,35 +186,21 @@ int register_pccard_driver(dev_info_t *dev_info,
...
@@ -188,35 +186,21 @@ int register_pccard_driver(dev_info_t *dev_info,
void
(
*
detach
)(
dev_link_t
*
))
void
(
*
detach
)(
dev_link_t
*
))
{
{
struct
pcmcia_driver
*
driver
;
struct
pcmcia_driver
*
driver
;
socket_bind_t
*
b
;
struct
pcmcia_bus_socket
*
bus_sock
;
DEBUG
(
0
,
"ds: register_pccard_driver('%s')
\n
"
,
(
char
*
)
dev_info
);
DEBUG
(
0
,
"ds: register_pccard_driver('%s')
\n
"
,
(
char
*
)
dev_info
);
driver
=
get_pcmcia_driver
(
dev_info
);
driver
=
get_pcmcia_driver
(
dev_info
);
if
(
!
driver
)
{
if
(
driver
)
driver
=
kmalloc
(
sizeof
(
struct
pcmcia_driver
),
GFP_KERNEL
);
return
-
EBUSY
;
if
(
!
driver
)
return
-
ENOMEM
;
memset
(
driver
,
0
,
sizeof
(
struct
pcmcia_driver
));
driver
=
kmalloc
(
sizeof
(
struct
pcmcia_driver
),
GFP_KERNEL
);
driver
->
drv
.
name
=
(
char
*
)
dev_info
;
if
(
!
driver
)
return
-
ENOMEM
;
pcmcia_register_driver
(
driver
);
memset
(
driver
,
0
,
sizeof
(
struct
pcmcia_driver
));
}
driver
->
drv
.
name
=
(
char
*
)
dev_info
;
pcmcia_register_driver
(
driver
);
driver
->
attach
=
attach
;
driver
->
attach
=
attach
;
driver
->
detach
=
detach
;
driver
->
detach
=
detach
;
if
(
driver
->
use_count
==
0
)
return
0
;
/* Instantiate any already-bound devices */
down_read
(
&
bus_socket_list_rwsem
);
list_for_each_entry
(
bus_sock
,
&
bus_socket_list
,
socket_list
)
{
for
(
b
=
bus_sock
->
bind
;
b
;
b
=
b
->
next
)
{
if
(
b
->
driver
!=
driver
)
continue
;
b
->
instance
=
driver
->
attach
();
if
(
b
->
instance
==
NULL
)
printk
(
KERN_NOTICE
"ds: unable to create instance "
"of '%s'!
\n
"
,
driver
->
drv
.
name
);
}
}
up_read
(
&
bus_socket_list_rwsem
);
return
0
;
return
0
;
}
/* register_pccard_driver */
}
/* register_pccard_driver */
...
@@ -411,16 +395,11 @@ static int bind_request(struct pcmcia_bus_socket *s, bind_info_t *bind_info)
...
@@ -411,16 +395,11 @@ static int bind_request(struct pcmcia_bus_socket *s, bind_info_t *bind_info)
if
(
!
s
)
if
(
!
s
)
return
-
EINVAL
;
return
-
EINVAL
;
DEBUG
(
2
,
"bind_request(%d, '%s')
\n
"
,
i
,
DEBUG
(
2
,
"bind_request(%d, '%s')
\n
"
,
s
->
socket_no
,
(
char
*
)
bind_info
->
dev_info
);
(
char
*
)
bind_info
->
dev_info
);
driver
=
get_pcmcia_driver
(
&
bind_info
->
dev_info
);
driver
=
get_pcmcia_driver
(
&
bind_info
->
dev_info
);
if
(
driver
==
NULL
)
{
if
(
!
driver
)
driver
=
kmalloc
(
sizeof
(
struct
pcmcia_driver
),
GFP_KERNEL
);
return
-
EINVAL
;
if
(
!
driver
)
return
-
ENOMEM
;
memset
(
driver
,
0
,
sizeof
(
struct
pcmcia_driver
));
driver
->
drv
.
name
=
bind_info
->
dev_info
;
pcmcia_register_driver
(
driver
);
}
for
(
b
=
s
->
bind
;
b
;
b
=
b
->
next
)
for
(
b
=
s
->
bind
;
b
;
b
=
b
->
next
)
if
((
driver
==
b
->
driver
)
&&
if
((
driver
==
b
->
driver
)
&&
...
@@ -543,7 +522,7 @@ static int unbind_request(struct pcmcia_bus_socket *s, bind_info_t *bind_info)
...
@@ -543,7 +522,7 @@ static int unbind_request(struct pcmcia_bus_socket *s, bind_info_t *bind_info)
{
{
socket_bind_t
**
b
,
*
c
;
socket_bind_t
**
b
,
*
c
;
DEBUG
(
2
,
"unbind_request(%d, '%s')
\n
"
,
i
,
DEBUG
(
2
,
"unbind_request(%d, '%s')
\n
"
,
s
->
socket_no
,
(
char
*
)
bind_info
->
dev_info
);
(
char
*
)
bind_info
->
dev_info
);
for
(
b
=
&
s
->
bind
;
*
b
;
b
=
&
(
*
b
)
->
next
)
for
(
b
=
&
s
->
bind
;
*
b
;
b
=
&
(
*
b
)
->
next
)
if
((
strcmp
((
char
*
)(
*
b
)
->
driver
->
drv
.
name
,
if
((
strcmp
((
char
*
)(
*
b
)
->
driver
->
drv
.
name
,
...
...
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