Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
6427d450
Commit
6427d450
authored
Oct 23, 2009
by
Eric Miao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ARM] pxa: use platform_device_id table for SSP driver
Signed-off-by:
Eric Miao
<
eric.y.miao@gmail.com
>
parent
4092855d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
58 deletions
+15
-58
arch/arm/mach-pxa/ssp.c
arch/arm/mach-pxa/ssp.c
+15
-58
No files found.
arch/arm/mach-pxa/ssp.c
View file @
6427d450
...
...
@@ -342,8 +342,9 @@ void ssp_free(struct ssp_device *ssp)
}
EXPORT_SYMBOL
(
ssp_free
);
static
int
__devinit
ssp_probe
(
struct
platform_device
*
pdev
,
int
type
)
static
int
__devinit
ssp_probe
(
struct
platform_device
*
pdev
)
{
const
struct
platform_device_id
*
id
=
platform_get_device_id
(
pdev
);
struct
resource
*
res
;
struct
ssp_device
*
ssp
;
int
ret
=
0
;
...
...
@@ -413,7 +414,7 @@ static int __devinit ssp_probe(struct platform_device *pdev, int type)
*/
ssp
->
port_id
=
pdev
->
id
+
1
;
ssp
->
use_count
=
0
;
ssp
->
type
=
type
;
ssp
->
type
=
(
int
)
id
->
driver_data
;
mutex_lock
(
&
ssp_lock
);
list_add
(
&
ssp
->
node
,
&
ssp_list
);
...
...
@@ -457,75 +458,31 @@ static int __devexit ssp_remove(struct platform_device *pdev)
return
0
;
}
static
int
__devinit
pxa25x_ssp_probe
(
struct
platform_device
*
pdev
)
{
return
ssp_probe
(
pdev
,
PXA25x_SSP
);
}
static
int
__devinit
pxa25x_nssp_probe
(
struct
platform_device
*
pdev
)
{
return
ssp_probe
(
pdev
,
PXA25x_NSSP
);
}
static
int
__devinit
pxa27x_ssp_probe
(
struct
platform_device
*
pdev
)
{
return
ssp_probe
(
pdev
,
PXA27x_SSP
);
}
static
struct
platform_driver
pxa25x_ssp_driver
=
{
.
driver
=
{
.
name
=
"pxa25x-ssp"
,
},
.
probe
=
pxa25x_ssp_probe
,
.
remove
=
__devexit_p
(
ssp_remove
),
static
const
struct
platform_device_id
ssp_id_table
[]
=
{
{
"pxa25x-ssp"
,
PXA25x_SSP
},
{
"pxa25x-nssp"
,
PXA25x_NSSP
},
{
"pxa27x-ssp"
,
PXA27x_SSP
},
{
},
};
static
struct
platform_driver
pxa25x_nssp_driver
=
{
.
driver
=
{
.
name
=
"pxa25x-nssp"
,
},
.
probe
=
pxa25x_nssp_probe
,
static
struct
platform_driver
ssp_driver
=
{
.
probe
=
ssp_probe
,
.
remove
=
__devexit_p
(
ssp_remove
),
};
static
struct
platform_driver
pxa27x_ssp_driver
=
{
.
driver
=
{
.
name
=
"pxa27x-ssp"
,
.
owner
=
THIS_MODULE
,
.
name
=
"pxa2xx-ssp"
,
},
.
probe
=
pxa27x_ssp_probe
,
.
remove
=
__devexit_p
(
ssp_remove
),
.
id_table
=
ssp_id_table
,
};
static
int
__init
pxa_ssp_init
(
void
)
{
int
ret
=
0
;
ret
=
platform_driver_register
(
&
pxa25x_ssp_driver
);
if
(
ret
)
{
printk
(
KERN_ERR
"failed to register pxa25x_ssp_driver"
);
return
ret
;
}
ret
=
platform_driver_register
(
&
pxa25x_nssp_driver
);
if
(
ret
)
{
printk
(
KERN_ERR
"failed to register pxa25x_nssp_driver"
);
return
ret
;
}
ret
=
platform_driver_register
(
&
pxa27x_ssp_driver
);
if
(
ret
)
{
printk
(
KERN_ERR
"failed to register pxa27x_ssp_driver"
);
return
ret
;
}
return
ret
;
return
platform_driver_register
(
&
ssp_driver
);
}
static
void
__exit
pxa_ssp_exit
(
void
)
{
platform_driver_unregister
(
&
pxa25x_ssp_driver
);
platform_driver_unregister
(
&
pxa25x_nssp_driver
);
platform_driver_unregister
(
&
pxa27x_ssp_driver
);
platform_driver_unregister
(
&
ssp_driver
);
}
arch_initcall
(
pxa_ssp_init
);
...
...
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