From 451aa862448a119af2faf52ac5410f491d3138d1 Mon Sep 17 00:00:00 2001 From: Bertrik Sikken Date: Sun, 1 Aug 2010 08:56:15 +0000 Subject: [PATCH] Various minor cleanups for mini2440 git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27645 a1c6a512-1295-4272-9138-f99709370657 --- firmware/drivers/audio/uda1341.c | 2 ++ firmware/target/arm/s3c2440/dma-s3c2440.c | 4 ++-- firmware/target/arm/s3c2440/mini2440/backlight-mini2440.c | 2 +- firmware/target/arm/s3c2440/mini2440/button-mini2440.c | 3 +++ firmware/target/arm/s3c2440/mini2440/led-mini2440.c | 1 + firmware/target/arm/s3c2440/mini2440/powermgmt-mini2440.c | 3 ++- firmware/target/arm/s3c2440/uart-s3c2440.c | 1 + 7 files changed, 12 insertions(+), 4 deletions(-) diff --git a/firmware/drivers/audio/uda1341.c b/firmware/drivers/audio/uda1341.c index a566b611c6..6b38353afe 100644 --- a/firmware/drivers/audio/uda1341.c +++ b/firmware/drivers/audio/uda1341.c @@ -221,10 +221,12 @@ void audiohw_set_treble(int value) } */ +#ifdef AUDIOHW_HAVE_PRESCALER void audiohw_set_prescaler(int val) { (void)val; } +#endif /* AUDIOHW_HAVE_PRESCALER */ /** * Sets left and right master volume (1(max) to 62(muted)) diff --git a/firmware/target/arm/s3c2440/dma-s3c2440.c b/firmware/target/arm/s3c2440/dma-s3c2440.c index c8df4fcc75..d514f3650e 100644 --- a/firmware/target/arm/s3c2440/dma-s3c2440.c +++ b/firmware/target/arm/s3c2440/dma-s3c2440.c @@ -35,7 +35,7 @@ static int dma_used = 0; /* Status flags */ #define STATUS_CHANNEL_ACTIVE (1<<0) -struct dma_channel_state +static struct dma_channel_state { volatile unsigned status; void (*callback)(void); @@ -162,7 +162,7 @@ void dma_enable_channel(int channel, struct dma_request *request) } /* ISRs */ -inline void generic_isr (unsigned channel) +static inline void generic_isr (unsigned channel) { if (dma_state [channel].status | STATUS_CHANNEL_ACTIVE) { diff --git a/firmware/target/arm/s3c2440/mini2440/backlight-mini2440.c b/firmware/target/arm/s3c2440/mini2440/backlight-mini2440.c index 88c0b5ce2c..a9e003b80a 100644 --- a/firmware/target/arm/s3c2440/mini2440/backlight-mini2440.c +++ b/firmware/target/arm/s3c2440/mini2440/backlight-mini2440.c @@ -54,7 +54,7 @@ void _backlight_set_brightness(int brightness) backlight_control = BACKLIGHT_CONTROL_SET; } -void _backlight_set_state (unsigned int level) +static void _backlight_set_state (unsigned int level) { if (level == 0) GPGDAT &= ~GPIO_LCD_PWR; diff --git a/firmware/target/arm/s3c2440/mini2440/button-mini2440.c b/firmware/target/arm/s3c2440/mini2440/button-mini2440.c index 0435f47559..981e2a1280 100644 --- a/firmware/target/arm/s3c2440/mini2440/button-mini2440.c +++ b/firmware/target/arm/s3c2440/mini2440/button-mini2440.c @@ -82,8 +82,11 @@ void touchpad_set_sensitivity(int level) /* No touchpad */ } +#ifdef HAVE_HEADPHONE_DETECTION bool headphones_inserted(void) { /* No detect */ return false; } +#endif /* HAVE_HEADPHONE_DETECTION */ + diff --git a/firmware/target/arm/s3c2440/mini2440/led-mini2440.c b/firmware/target/arm/s3c2440/mini2440/led-mini2440.c index f541d75273..606d443184 100644 --- a/firmware/target/arm/s3c2440/mini2440/led-mini2440.c +++ b/firmware/target/arm/s3c2440/mini2440/led-mini2440.c @@ -21,6 +21,7 @@ #include "config.h" #include "cpu.h" #include "kernel.h" +#include "led-mini2440.h" /* LED functions for debug */ diff --git a/firmware/target/arm/s3c2440/mini2440/powermgmt-mini2440.c b/firmware/target/arm/s3c2440/mini2440/powermgmt-mini2440.c index 5584993040..5281b10698 100644 --- a/firmware/target/arm/s3c2440/mini2440/powermgmt-mini2440.c +++ b/firmware/target/arm/s3c2440/mini2440/powermgmt-mini2440.c @@ -58,6 +58,7 @@ unsigned int battery_adc_voltage(void) return 4000 * 1024 / 1000; } +#ifdef HAVE_BATTERY_SWITCH unsigned int input_millivolts(void) { unsigned int batt_millivolts = battery_voltage(); @@ -65,5 +66,5 @@ unsigned int input_millivolts(void) /* No battery, return nominal value */ return batt_millivolts; } - +#endif /* HAVE_BATTERY_SWITCH */ diff --git a/firmware/target/arm/s3c2440/uart-s3c2440.c b/firmware/target/arm/s3c2440/uart-s3c2440.c index 8fe6511253..e9c9345103 100644 --- a/firmware/target/arm/s3c2440/uart-s3c2440.c +++ b/firmware/target/arm/s3c2440/uart-s3c2440.c @@ -33,6 +33,7 @@ #include "system-target.h" #include "uart-s3c2440.h" +#include "serial.h" #define MAX_PRINTF_BUF 1024