mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
mv643xx_eth: get rid of static variables, allow multiple instances
Move mv643xx_eth's static state (ethernet register block base address and MII management interface spinlock) into a struct hanging off the shared platform device. This is necessary to support chips that contain multiple mv643xx_eth silicon blocks. Signed-off-by: Lennert Buytenhek <[email protected]> Acked-by: Nicolas Pitre <[email protected]> Signed-off-by: Dale Farnsworth <[email protected]>
This commit is contained in:
parent
e31a94ed37
commit
fa3959f457
6 changed files with 59 additions and 17 deletions
|
|
@ -223,7 +223,9 @@ static struct platform_device orion5x_eth = {
|
|||
|
||||
void __init orion5x_eth_init(struct mv643xx_eth_platform_data *eth_data)
|
||||
{
|
||||
eth_data->shared = &orion5x_eth_shared;
|
||||
orion5x_eth.dev.platform_data = eth_data;
|
||||
|
||||
platform_device_register(&orion5x_eth_shared);
|
||||
platform_device_register(&orion5x_eth);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue