aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@rpsys.net>2007-05-13 08:32:23 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2007-05-16 10:35:25 -0400
commitaceb6f0b6da20a86516d59f73ecdc7ea3c4a23da (patch)
tree0c8fb7ec6fe95815261650c7cab1477c351b0043 /arch/arm
parent7b104bcb8e460e45a1aebe3da9b86aacdb4cab12 (diff)
[ARM] 4375/1: sharpsl_pm: Fix compile warnings
Fix compile warnings from sharpsl_pm.c. Attribute registration failure doesn't stop the driver working so just warn about it. Signed-off-by: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/common/sharpsl_pm.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/arch/arm/common/sharpsl_pm.c b/arch/arm/common/sharpsl_pm.c
index 5972df2b9af4..c8e78d96e592 100644
--- a/arch/arm/common/sharpsl_pm.c
+++ b/arch/arm/common/sharpsl_pm.c
@@ -153,7 +153,7 @@ static void sharpsl_battery_thread(struct work_struct *private_)
153 sharpsl_pm.battstat.mainbat_percent = percent; 153 sharpsl_pm.battstat.mainbat_percent = percent;
154 } 154 }
155 155
156 dev_dbg(sharpsl_pm.dev, "Battery: voltage: %d, status: %d, percentage: %d, time: %d\n", voltage, 156 dev_dbg(sharpsl_pm.dev, "Battery: voltage: %d, status: %d, percentage: %d, time: %ld\n", voltage,
157 sharpsl_pm.battstat.mainbat_status, sharpsl_pm.battstat.mainbat_percent, jiffies); 157 sharpsl_pm.battstat.mainbat_status, sharpsl_pm.battstat.mainbat_percent, jiffies);
158 158
159 /* If battery is low. limit backlight intensity to save power. */ 159 /* If battery is low. limit backlight intensity to save power. */
@@ -625,7 +625,7 @@ static int sharpsl_fatal_check(void)
625 } 625 }
626 626
627 temp = get_select_val(buff); 627 temp = get_select_val(buff);
628 dev_dbg(sharpsl_pm.dev, "sharpsl_fatal_check: acin: %d, discharge voltage: %d, no discharge: %d\n", acin, temp, sharpsl_pm.machinfo->read_devdata(SHARPSL_BATT_VOLT)); 628 dev_dbg(sharpsl_pm.dev, "sharpsl_fatal_check: acin: %d, discharge voltage: %d, no discharge: %ld\n", acin, temp, sharpsl_pm.machinfo->read_devdata(SHARPSL_BATT_VOLT));
629 629
630 if ((acin && (temp < sharpsl_pm.machinfo->fatal_acin_volt)) || 630 if ((acin && (temp < sharpsl_pm.machinfo->fatal_acin_volt)) ||
631 (!acin && (temp < sharpsl_pm.machinfo->fatal_noacin_volt))) 631 (!acin && (temp < sharpsl_pm.machinfo->fatal_noacin_volt)))
@@ -774,6 +774,8 @@ static struct pm_ops sharpsl_pm_ops = {
774 774
775static int __init sharpsl_pm_probe(struct platform_device *pdev) 775static int __init sharpsl_pm_probe(struct platform_device *pdev)
776{ 776{
777 int ret;
778
777 if (!pdev->dev.platform_data) 779 if (!pdev->dev.platform_data)
778 return -EINVAL; 780 return -EINVAL;
779 781
@@ -792,8 +794,10 @@ static int __init sharpsl_pm_probe(struct platform_device *pdev)
792 794
793 sharpsl_pm.machinfo->init(); 795 sharpsl_pm.machinfo->init();
794 796
795 device_create_file(&pdev->dev, &dev_attr_battery_percentage); 797 ret = device_create_file(&pdev->dev, &dev_attr_battery_percentage);
796 device_create_file(&pdev->dev, &dev_attr_battery_voltage); 798 ret |= device_create_file(&pdev->dev, &dev_attr_battery_voltage);
799 if (ret != 0)
800 dev_warn(&pdev->dev, "Failed to register attributes (%d)\n", ret);
797 801
798 apm_get_power_status = sharpsl_apm_get_power_status; 802 apm_get_power_status = sharpsl_apm_get_power_status;
799 803