Patchworkβ rb532: fix devices.c compilation

login
register
about
Submitter Florian Fainelli
Date 2009-12-02 12:07:01
Message ID <200912021307.02014.florian@openwrt.org>
Download mbox | patch
Permalink /patch/747/
State Accepted
Delegated to: Ralf Baechle
Headers show

Comments

Florian Fainelli - 2009-12-02 12:07:01
We should now use dev_set_drvdata to set the driver
driver_data field.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
Ralf Baechle - 2009-12-02 12:38:50
On Wed, Dec 02, 2009 at 01:07:01PM +0100, Florian Fainelli wrote:

> We should now use dev_set_drvdata to set the driver
> driver_data field.

Thanks, applied.

  Ralf

Patch

diff --git a/arch/mips/rb532/devices.c b/arch/mips/rb532/devices.c
index 9f40e1f..041fc1a 100644
--- a/arch/mips/rb532/devices.c
+++ b/arch/mips/rb532/devices.c
@@ -110,7 +110,6 @@  static struct korina_device korina_dev0_data = {
 static struct platform_device korina_dev0 = {
 	.id = -1,
 	.name = "korina",
-	.dev.driver_data = &korina_dev0_data,
 	.resource = korina_dev0_res,
 	.num_resources = ARRAY_SIZE(korina_dev0_res),
 };
@@ -332,6 +331,8 @@  static int __init plat_setup_devices(void)
 	/* set the uart clock to the current cpu frequency */
 	rb532_uart_res[0].uartclk = idt_cpu_freq;
 
+	dev_set_drvdata(&korina_dev0.dev, &korina_dev0_data);
+
 	return platform_add_devices(rb532_devs, ARRAY_SIZE(rb532_devs));
 }