aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/common
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2008-04-20 12:15:32 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2008-05-19 11:25:57 -0400
commit02a8e76979f9b439642e67955edb865c112926f6 (patch)
treea4465fc5c6ce78931e165ec7736ad9ff273e3851 /arch/arm/common
parentb8291ad07a7f3b5b990900f0001198ac23ba893e (diff)
[ARM] pxa: corgibl_limit_intensity build errors
If CONFIG_BACKLIGHT_CORGI is not selected, then corgibl_limit_intensity() is not present. However, both corgi_pm.c and sharp_pm.c reference this symbol, resulting in a link error. Wrap the references with the relevant ifdefs, and avoid the resulting NULL pointer dereference by making the code in sharpsl_pm.c also conditional on the config symbol. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/common')
-rw-r--r--arch/arm/common/sharpsl_pm.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/arm/common/sharpsl_pm.c b/arch/arm/common/sharpsl_pm.c
index 5bba5255b119..5736c987c80d 100644
--- a/arch/arm/common/sharpsl_pm.c
+++ b/arch/arm/common/sharpsl_pm.c
@@ -157,6 +157,7 @@ static void sharpsl_battery_thread(struct work_struct *private_)
157 dev_dbg(sharpsl_pm.dev, "Battery: voltage: %d, status: %d, percentage: %d, time: %ld\n", voltage, 157 dev_dbg(sharpsl_pm.dev, "Battery: voltage: %d, status: %d, percentage: %d, time: %ld\n", voltage,
158 sharpsl_pm.battstat.mainbat_status, sharpsl_pm.battstat.mainbat_percent, jiffies); 158 sharpsl_pm.battstat.mainbat_status, sharpsl_pm.battstat.mainbat_percent, jiffies);
159 159
160#ifdef CONFIG_BACKLIGHT_CORGI
160 /* If battery is low. limit backlight intensity to save power. */ 161 /* If battery is low. limit backlight intensity to save power. */
161 if ((sharpsl_pm.battstat.ac_status != APM_AC_ONLINE) 162 if ((sharpsl_pm.battstat.ac_status != APM_AC_ONLINE)
162 && ((sharpsl_pm.battstat.mainbat_status == APM_BATTERY_STATUS_LOW) || 163 && ((sharpsl_pm.battstat.mainbat_status == APM_BATTERY_STATUS_LOW) ||
@@ -169,6 +170,7 @@ static void sharpsl_battery_thread(struct work_struct *private_)
169 sharpsl_pm.machinfo->backlight_limit(0); 170 sharpsl_pm.machinfo->backlight_limit(0);
170 sharpsl_pm.flags &= ~SHARPSL_BL_LIMIT; 171 sharpsl_pm.flags &= ~SHARPSL_BL_LIMIT;
171 } 172 }
173#endif
172 174
173 /* Suspend if critical battery level */ 175 /* Suspend if critical battery level */
174 if ((sharpsl_pm.battstat.ac_status != APM_AC_ONLINE) 176 if ((sharpsl_pm.battstat.ac_status != APM_AC_ONLINE)