From 2b7c213e93b82dcf4a964343b0a9989409378263 Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Sat, 9 Jun 2007 10:11:16 -0400 Subject: [PATCH] --- yaml --- r: 61785 b: refs/heads/master c: 2df6d811574f46bea0d38bf91aa54df4c05488cd h: refs/heads/master i: 61783: 1db5097cf2050073406263d31deb35285818bbc9 v: v3 --- [refs] | 2 +- trunk/drivers/hwmon/f71805f.c | 9 +++------ trunk/drivers/hwmon/smsc47m1.c | 9 +++------ trunk/drivers/hwmon/w83627hf.c | 9 +++------ 4 files changed, 10 insertions(+), 19 deletions(-) diff --git a/[refs] b/[refs] index 563c571d6fbd..f627545524fd 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f641b588fdfd25e73c73f6e4977cd2daf8a5e363 +refs/heads/master: 2df6d811574f46bea0d38bf91aa54df4c05488cd diff --git a/trunk/drivers/hwmon/f71805f.c b/trunk/drivers/hwmon/f71805f.c index cdbe309b8fc4..e8b15047a6d3 100644 --- a/trunk/drivers/hwmon/f71805f.c +++ b/trunk/drivers/hwmon/f71805f.c @@ -1290,15 +1290,12 @@ static int __init f71805f_device_add(unsigned short address, goto exit_device_put; } - pdev->dev.platform_data = kmalloc(sizeof(struct f71805f_sio_data), - GFP_KERNEL); - if (!pdev->dev.platform_data) { - err = -ENOMEM; + err = platform_device_add_data(pdev, sio_data, + sizeof(struct f71805f_sio_data)); + if (err) { printk(KERN_ERR DRVNAME ": Platform data allocation failed\n"); goto exit_device_put; } - memcpy(pdev->dev.platform_data, sio_data, - sizeof(struct f71805f_sio_data)); err = platform_device_add(pdev); if (err) { diff --git a/trunk/drivers/hwmon/smsc47m1.c b/trunk/drivers/hwmon/smsc47m1.c index 1e21c8cc948f..9bac3c2d84f9 100644 --- a/trunk/drivers/hwmon/smsc47m1.c +++ b/trunk/drivers/hwmon/smsc47m1.c @@ -693,15 +693,12 @@ static int __init smsc47m1_device_add(unsigned short address, goto exit_device_put; } - pdev->dev.platform_data = kmalloc(sizeof(struct smsc47m1_sio_data), - GFP_KERNEL); - if (!pdev->dev.platform_data) { - err = -ENOMEM; + err = platform_device_add_data(pdev, sio_data, + sizeof(struct smsc47m1_sio_data)); + if (err) { printk(KERN_ERR DRVNAME ": Platform data allocation failed\n"); goto exit_device_put; } - memcpy(pdev->dev.platform_data, sio_data, - sizeof(struct smsc47m1_sio_data)); err = platform_device_add(pdev); if (err) { diff --git a/trunk/drivers/hwmon/w83627hf.c b/trunk/drivers/hwmon/w83627hf.c index 12cb40a975de..72aee3c0e8de 100644 --- a/trunk/drivers/hwmon/w83627hf.c +++ b/trunk/drivers/hwmon/w83627hf.c @@ -1548,15 +1548,12 @@ static int __init w83627hf_device_add(unsigned short address, goto exit_device_put; } - pdev->dev.platform_data = kmalloc(sizeof(struct w83627hf_sio_data), - GFP_KERNEL); - if (!pdev->dev.platform_data) { - err = -ENOMEM; + err = platform_device_add_data(pdev, sio_data, + sizeof(struct w83627hf_sio_data)); + if (err) { printk(KERN_ERR DRVNAME ": Platform data allocation failed\n"); goto exit_device_put; } - memcpy(pdev->dev.platform_data, sio_data, - sizeof(struct w83627hf_sio_data)); err = platform_device_add(pdev); if (err) {