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
5dbb10ef
Commit
5dbb10ef
authored
Jun 10, 2003
by
Russell King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PCMCIA] Convert sa11xx platforms to use new class code.
parent
3bb31f0d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
27 deletions
+15
-27
drivers/pcmcia/sa1100_generic.c
drivers/pcmcia/sa1100_generic.c
+3
-22
drivers/pcmcia/sa1111_generic.c
drivers/pcmcia/sa1111_generic.c
+2
-2
drivers/pcmcia/sa11xx_core.c
drivers/pcmcia/sa11xx_core.c
+10
-3
No files found.
drivers/pcmcia/sa1100_generic.c
View file @
5dbb10ef
...
@@ -106,17 +106,8 @@ static struct device_driver sa11x0_pcmcia_driver = {
...
@@ -106,17 +106,8 @@ static struct device_driver sa11x0_pcmcia_driver = {
.
remove
=
sa11xx_drv_pcmcia_remove
,
.
remove
=
sa11xx_drv_pcmcia_remove
,
.
name
=
"sa11x0-pcmcia"
,
.
name
=
"sa11x0-pcmcia"
,
.
bus
=
&
platform_bus_type
,
.
bus
=
&
platform_bus_type
,
.
devclass
=
&
pcmcia_socket_class
,
/* .suspend = pcmcia_socket_dev_suspend,*/
.
suspend
=
pcmcia_socket_dev_suspend
,
/* .resume = pcmcia_socket_dev_resume,*/
.
resume
=
pcmcia_socket_dev_resume
,
};
static
struct
platform_device
sa11x0_pcmcia_device
=
{
.
name
=
"sa11x0-pcmcia"
,
.
id
=
0
,
.
dev
=
{
.
name
=
"Intel Corporation SA11x0 [PCMCIA]"
,
},
};
};
/* sa11x0_pcmcia_init()
/* sa11x0_pcmcia_init()
...
@@ -129,16 +120,7 @@ static struct platform_device sa11x0_pcmcia_device = {
...
@@ -129,16 +120,7 @@ static struct platform_device sa11x0_pcmcia_device = {
*/
*/
static
int
__init
sa11x0_pcmcia_init
(
void
)
static
int
__init
sa11x0_pcmcia_init
(
void
)
{
{
int
ret
;
return
driver_register
(
&
sa11x0_pcmcia_driver
);
ret
=
driver_register
(
&
sa11x0_pcmcia_driver
);
if
(
ret
==
0
)
{
ret
=
platform_device_register
(
&
sa11x0_pcmcia_device
);
if
(
ret
)
driver_unregister
(
&
sa11x0_pcmcia_driver
);
}
return
ret
;
}
}
/* sa11x0_pcmcia_exit()
/* sa11x0_pcmcia_exit()
...
@@ -148,7 +130,6 @@ static int __init sa11x0_pcmcia_init(void)
...
@@ -148,7 +130,6 @@ static int __init sa11x0_pcmcia_init(void)
*/
*/
static
void
__exit
sa11x0_pcmcia_exit
(
void
)
static
void
__exit
sa11x0_pcmcia_exit
(
void
)
{
{
platform_device_unregister
(
&
sa11x0_pcmcia_device
);
driver_unregister
(
&
sa11x0_pcmcia_driver
);
driver_unregister
(
&
sa11x0_pcmcia_driver
);
}
}
...
...
drivers/pcmcia/sa1111_generic.c
View file @
5dbb10ef
...
@@ -178,8 +178,8 @@ static struct sa1111_driver pcmcia_driver = {
...
@@ -178,8 +178,8 @@ static struct sa1111_driver pcmcia_driver = {
.
bus
=
&
sa1111_bus_type
,
.
bus
=
&
sa1111_bus_type
,
.
probe
=
pcmcia_probe
,
.
probe
=
pcmcia_probe
,
.
remove
=
__devexit_p
(
pcmcia_remove
),
.
remove
=
__devexit_p
(
pcmcia_remove
),
.
suspend
=
pcmcia_socket_dev_suspend
,
/* .suspend = pcmcia_socket_dev_suspend,*/
.
resume
=
pcmcia_socket_dev_resume
,
/* .resume = pcmcia_socket_dev_resume,*/
},
},
.
devid
=
SA1111_DEVID_PCMCIA
,
.
devid
=
SA1111_DEVID_PCMCIA
,
};
};
...
...
drivers/pcmcia/sa11xx_core.c
View file @
5dbb10ef
...
@@ -822,6 +822,10 @@ int sa11xx_drv_pcmcia_probe(struct device *dev, struct pcmcia_low_level *ops, in
...
@@ -822,6 +822,10 @@ int sa11xx_drv_pcmcia_probe(struct device *dev, struct pcmcia_low_level *ops, in
memset
(
cls
,
0
,
sizeof
(
struct
pcmcia_socket_class_data
));
memset
(
cls
,
0
,
sizeof
(
struct
pcmcia_socket_class_data
));
cls
->
ops
=
&
sa11xx_pcmcia_operations
;
cls
->
ops
=
&
sa11xx_pcmcia_operations
;
cls
->
nsock
=
nr
;
cls
->
nsock
=
nr
;
cls
->
class_dev
.
class
=
&
pcmcia_socket_class
;
cls
->
class_dev
.
dev
=
dev
;
strlcpy
(
cls
->
class_dev
.
class_id
,
dev
->
bus_id
,
BUS_ID_SIZE
);
class_set_devdata
(
&
cls
->
class_dev
,
cls
);
cpu_clock
=
cpufreq_get
(
0
);
cpu_clock
=
cpufreq_get
(
0
);
...
@@ -901,7 +905,9 @@ int sa11xx_drv_pcmcia_probe(struct device *dev, struct pcmcia_low_level *ops, in
...
@@ -901,7 +905,9 @@ int sa11xx_drv_pcmcia_probe(struct device *dev, struct pcmcia_low_level *ops, in
add_timer
(
&
skt
->
poll_timer
);
add_timer
(
&
skt
->
poll_timer
);
}
}
dev
->
class_data
=
cls
;
dev_set_drvdata
(
dev
,
cls
);
class_device_register
(
&
cls
->
class_dev
);
return
0
;
return
0
;
do
{
do
{
...
@@ -934,10 +940,11 @@ EXPORT_SYMBOL(sa11xx_drv_pcmcia_probe);
...
@@ -934,10 +940,11 @@ EXPORT_SYMBOL(sa11xx_drv_pcmcia_probe);
int
sa11xx_drv_pcmcia_remove
(
struct
device
*
dev
)
int
sa11xx_drv_pcmcia_remove
(
struct
device
*
dev
)
{
{
struct
pcmcia_socket_class_data
*
cls
=
dev
->
class_data
;
struct
pcmcia_socket_class_data
*
cls
=
dev
_get_drvdata
(
dev
)
;
int
i
;
int
i
;
dev
->
class_data
=
NULL
;
class_device_unregister
(
&
cls
->
class_dev
);
dev_set_drvdata
(
dev
,
NULL
);
for
(
i
=
0
;
i
<
cls
->
nsock
;
i
++
)
{
for
(
i
=
0
;
i
<
cls
->
nsock
;
i
++
)
{
struct
sa1100_pcmcia_socket
*
skt
=
PCMCIA_SOCKET
(
cls
->
sock_offset
+
i
);
struct
sa1100_pcmcia_socket
*
skt
=
PCMCIA_SOCKET
(
cls
->
sock_offset
+
i
);
...
...
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