]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
CodingStyle fixes based on LKML comments
authorTony Lindgren <tony@atomide.com>
Mon, 16 Apr 2007 18:06:32 +0000 (18:06 +0000)
committerTony Lindgren <tony@atomide.com>
Mon, 16 Apr 2007 18:06:32 +0000 (18:06 +0000)
Changes are mostly:

- No externs in .c files
- Use standard commenting format
- Use standard debug functions or loglevel for printk

Signed-off-by: Tony Lindgren <tony@atomide.com>
16 files changed:
arch/arm/mach-omap1/Kconfig
arch/arm/mach-omap1/board-palmz71.c
arch/arm/mach-omap2/board-n800-audio.c
arch/arm/mach-omap2/board-n800-dsp.c
arch/arm/mach-omap2/board-n800-flash.c
arch/arm/mach-omap2/board-n800-mmc.c
arch/arm/mach-omap2/board-n800-pm.c
arch/arm/mach-omap2/board-n800-usb.c
arch/arm/mach-omap2/board-n800.c
arch/arm/mach-omap2/pm.c
arch/arm/plat-omap/fb.c
arch/arm/plat-omap/sram.c
include/asm-arm/arch-omap/board-nokia.h
include/asm-arm/arch-omap/gpio.h
include/asm-arm/arch-omap/gpmc.h
include/asm-arm/arch-omap/pm.h

index 5a87aa982dd87739efc2101ef2c3bc29aa7859c0..72852dc6ae9d12d950a43456f0ef1706f70d0a80 100644 (file)
@@ -90,13 +90,13 @@ config MACH_OMAP_PALMTE
          Say Y here if you have this PDA model, say N otherwise.
 
 config MACH_OMAP_PALMZ71
-       bool "Palm Zire71"
-       depends on ARCH_OMAP1 && ARCH_OMAP15XX
-       help
-         Support for the Palm Zire71 PDA. To boot the kernel,
-         you'll need a PalmOS compatible bootloader; check out
-         http://hackndev.com/palm/z71 for more informations.
-         Say Y here if you have such a PDA, say N otherwise.
+       bool "Palm Zire71"
+       depends on ARCH_OMAP1 && ARCH_OMAP15XX
+       help
+        Support for the Palm Zire71 PDA. To boot the kernel,
+        you'll need a PalmOS compatible bootloader; check out
+        http://hackndev.com/palm/z71 for more informations.
+        Say Y here if you have such a PDA, say N otherwise.
 
 config MACH_OMAP_PALMTT
        bool "Palm Tungsten|T"
index 3936190db8400646be84335e173956dca97275cb..c275d517764a91013b47003f8f2d91da86d96582 100644 (file)
@@ -199,12 +199,12 @@ static struct omap_mcbsp_reg_cfg mcbsp_regs = {
 static struct omap_alsa_codec_config alsa_config = {
        .name                   = "PalmZ71 AIC23",
        .mcbsp_regs_alsa        = &mcbsp_regs,
-       .codec_configure_dev    = NULL,         // aic23_configure,
-       .codec_set_samplerate   = NULL,         // aic23_set_samplerate,
-       .codec_clock_setup      = NULL,         // aic23_clock_setup,
-       .codec_clock_on         = NULL,         // aic23_clock_on,
-       .codec_clock_off        = NULL,         // aic23_clock_off,
-       .get_default_samplerate = NULL,         // aic23_get_default_samplerate,
+       .codec_configure_dev    = NULL, /* aic23_configure */
+       .codec_set_samplerate   = NULL, /* aic23_set_samplerate */
+       .codec_clock_setup      = NULL, /* aic23_clock_setup */
+       .codec_clock_on         = NULL, /* aic23_clock_on */
+       .codec_clock_off        = NULL, /* aic23_clock_off */
+       .get_default_samplerate = NULL, /* aic23_get_default_samplerate */
 };
 
 static struct platform_device palmz71_mcbsp1_device = {
@@ -345,7 +345,7 @@ palmz71_gpio_setup(int early)
                                palmz71_powercable, IRQF_SAMPLE_RANDOM,
                                "palmz71-cable", 0))
                        printk(KERN_ERR
-                              "IRQ request for power cable failed!\n");
+                                       "IRQ request for power cable failed!\n");
                palmz71_powercable(OMAP_GPIO_IRQ(PALMZ71_USBDETECT_GPIO), 0);
        }
 }
index fa6ab869927a054a6553feada55c87d6b265eb51..9033de58319750ef930ccce93a4dfa9e4fdf051b 100644 (file)
@@ -188,14 +188,14 @@ static int n800_codec_get_clocks(struct device *dev)
 {
        sys_clkout2 = clk_get(dev, "sys_clkout2");
        if (IS_ERR(sys_clkout2)) {
-               printk(KERN_ERR "Could not get sys_clkout2\n");
+               dev_err(dev, "Could not get sys_clkout2\n");
                return -ENODEV;
        }
        /* configure 12 MHz output on SYS_CLKOUT2. Therefore we must use
         * 96 MHz as its parent in order to get 12 MHz */
        func96m_clk = clk_get(dev, "func_96m_ck");
        if (IS_ERR(func96m_clk)) {
-               printk(KERN_ERR "could not get func 96M clock\n");
+               dev_err(dev, "Could not get func 96M clock\n");
                clk_put(sys_clkout2);
                return -ENODEV;
        }
index a15ff961fbfde64fb6a2462fa19407d341ec9c35..b6da02f8f75864fed2a1f18bb8533e234a7480b0 100644 (file)
 
 #include <asm/io.h>
 #include <asm/arch/clock.h>
+#include <asm/arch/board.h>
 
 #include "../plat-omap/dsp/dsp_common.h"
 
-extern int n800_audio_enable(struct dsp_kfunc_device *kdev, int stage);
-extern int n800_audio_disable(struct dsp_kfunc_device *kdev, int stage);
-
 #if    defined(CONFIG_OMAP_DSP)
 
 /*
index 4005cfb56ad1916aa54462e03cac3f5e534db470..528ee52a3773c3e7d940d6b8ae70e41d36bcc88e 100644 (file)
@@ -28,7 +28,7 @@ static struct omap_onenand_platform_data n800_onenand_data = {
        .gpio_irq = 26,
        .parts = n800_partitions,
        .nr_parts = 0, /* filled later */
-       .onenand_setup = n800_onenand_setup
+       .onenand_setup = n800_onenand_setup,
 };
 
 static struct platform_device n800_onenand_device = {
@@ -134,7 +134,7 @@ void __init n800_flash_init(void)
        int i = 0;
 
        while ((part = omap_get_nr_config(OMAP_TAG_PARTITION,
-                                         struct omap_partition_config, i)) != NULL) {
+                               struct omap_partition_config, i)) != NULL) {
                struct mtd_partition *mpart;
 
                mpart = n800_partitions + i;
index b20f1ad02a53141b15c09d0eebef472434e83ad0..b0bdd97ea535f67461bc95c8317ae15823838381 100644 (file)
@@ -2,7 +2,7 @@
  * linux/arch/arm/mach-omap2/board-n800-mmc.c
  *
  * Copyright (C) 2006 Nokia Corporation
- * Author: Juha Yrj?l?
+ * Author: Juha Yrjola
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -31,7 +31,7 @@ static struct device *mmc_device;
 static int n800_mmc_switch_slot(struct device *dev, int slot)
 {
 #ifdef CONFIG_MMC_DEBUG
-       printk("Choose slot %d\n", slot + 1);
+       dev_dbg(dev, "Choose slot %d\n", slot + 1);
 #endif
        if (slot == 0)
                omap_set_gpio_dataout(slot_switch_gpio, 0);
@@ -40,13 +40,14 @@ static int n800_mmc_switch_slot(struct device *dev, int slot)
        return 0;
 }
 
-static int n800_mmc_set_power(struct device *dev, int slot, int power_on, int vdd)
+static int n800_mmc_set_power(struct device *dev, int slot, int power_on,
+                               int vdd)
 {
        int mV;
 
 #ifdef CONFIG_MMC_DEBUG
-       printk("Set slot %d power: %s (vdd %d)\n", slot + 1,
-              power_on ? "on" : "off", vdd);
+       dev_dbg(dev, "Set slot %d power: %s (vdd %d)\n", slot + 1,
+               power_on ? "on" : "off", vdd);
 #endif
        if (slot == 0) {
                if (!power_on)
@@ -119,8 +120,8 @@ static int n800_mmc_set_bus_mode(struct device *dev, int slot, int bus_mode)
        int r;
 
 #ifdef CONFIG_MMC_DEBUG
-       printk("Set slot %d bus mode %s\n", slot + 1,
-              bus_mode == MMC_BUSMODE_OPENDRAIN ? "open-drain" : "push-pull");
+       dev_dbg(dev, "Set slot %d bus mode %s\n", slot + 1,
+               bus_mode == MMC_BUSMODE_OPENDRAIN ? "open-drain" : "push-pull");
 #endif
        BUG_ON(slot != 0 && slot != 1);
        slot++;
@@ -135,7 +136,8 @@ static int n800_mmc_set_bus_mode(struct device *dev, int slot, int bus_mode)
                BUG();
        }
        if (r != 0 && printk_ratelimit())
-               printk(KERN_ERR "MMC: unable to set bus mode for slot %d\n", slot);
+               dev_err(dev, "MMC: unable to set bus mode for slot %d\n",
+                       slot);
        return r;
 }
 
@@ -150,7 +152,8 @@ static int n800_mmc_get_ro(struct device *dev, int slot)
        else
                ro = omap_get_gpio_datain(slot2_wp_gpio);
 #ifdef CONFIG_MMC_DEBUG
-       printk("Get RO slot %d: %s\n", slot, ro ? "read-only" : "read-write");
+       dev_dbg(dev, "Get RO slot %d: %s\n",
+               slot, ro ? "read-only" : "read-write");
 #endif
        return ro;
 }
index fb2873e7ba3a1fd3ddd197ed1dc0dbdc4bbf41af..33f3e4da3e4f3e10224a8b398dd420adb19e5ffb 100644 (file)
@@ -27,7 +27,8 @@ static int n800_auto_sleep_regulators(void)
 
        ret = menelaus_set_regulator_sleep(1, val);
        if (ret < 0) {
-               printk(KERN_ERR "Could not set regulators to sleep on menelaus: %u\n", ret);
+               printk(KERN_ERR "Could not set regulators to sleep on "
+                       "menelaus: %u\n", ret);
                return ret;
        }
        return 0;
@@ -39,7 +40,8 @@ static int n800_auto_voltage_scale(void)
 
        ret = menelaus_set_vcore_hw(1400, 1050);
        if (ret < 0) {
-               printk(KERN_ERR "Could not set VCORE voltage on menelaus: %u\n", ret);
+               printk(KERN_ERR "Could not set VCORE voltage on "
+                       "menelaus: %u\n", ret);
                return ret;
        }
        return 0;
index f6cc15cb793cf297055517b18d8b762dcf818183..bfd606b5bbf342dba9512c33f0d5cec2e9095a19 100644 (file)
@@ -2,7 +2,7 @@
  * linux/arch/arm/mach-omap2/board-n800-usb.c
  *
  * Copyright (C) 2006 Nokia Corporation
- * Author: Juha Yrj?l?
+ * Author: Juha Yrjola
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
index bb805cf0152885cb24c77719021a1ff2cfe6d9bf..73ff6236112f37239272ae9a478696904e6d75e3 100644 (file)
@@ -2,7 +2,7 @@
  * linux/arch/arm/mach-omap2/board-n800.c
  *
  * Copyright (C) 2005 Nokia Corporation
- * Author: Juha Yrj?l? <juha.yrjola@nokia.com>
+ * Author: Juha Yrjola <juha.yrjola@nokia.com>
  *
  * Modified from mach-omap2/board-generic.c
  *
@@ -333,7 +333,7 @@ static void tsc2301_dev_init(void)
        int gpio = N800_KEYB_IRQ_GPIO;
 
        if (omap_request_gpio(gpio) < 0) {
-               printk("can't get KBIRQ GPIO\n");
+               printk(KERN_ERR "can't get KBIRQ GPIO\n");
                return;
        }
        omap_set_gpio_direction(gpio, 1);
@@ -442,8 +442,6 @@ static inline void n800_ts_set_config(void)
 }
 #endif
 
-extern void n800_mmc_slot1_cover_handler(void *arg, int state);
-
 static struct omap_gpio_switch n800_gpio_switches[] __initdata = {
        {
                .name                   = "bat_cover",
@@ -476,14 +474,6 @@ static struct platform_device *n800_devices[] __initdata = {
 #endif
 };
 
-extern void __init n800_flash_init(void);
-extern void __init n800_mmc_init(void);
-extern void __init n800_bt_init(void);
-extern void __init n800_audio_init(struct tsc2301_platform_data *);
-extern void __init n800_dsp_init(void);
-extern void __init n800_usb_init(void);
-extern void __init n800_pm_init(void);
-
 static void __init nokia_n800_init(void)
 {
        platform_add_devices(n800_devices, ARRAY_SIZE(n800_devices));
index ef2c06731437810c7b2a4d3c5e7b881e8666d6cf..7c988adc63ccac32f5daf2a77c3f7af3c76b885f 100644 (file)
@@ -3,22 +3,16 @@
  *
  * OMAP2 Power Management Routines
  *
+ * Copyright (C) 2005 Texas Instruments, Inc.
  * Copyright (C) 2006 Nokia Corporation
- * Tony Lindgren <tony@atomide.com>
  *
- * Fixed suspend-resume/dynamic-idle to get OMAP to retention
+ * Written by:
+ * Richard Woodruff <r-woodruff2@ti.com>
+ * Tony Lindgren
+ * Juha Yrjola
  * Amit Kucheria <amit.kucheria@nokia.com>
  * Igor Stoppa <igor.stoppa@nokia.com>
  *
- * Fixed MPU sleep to get ARM idle
- * Igor Stoppa <igor.stoppa@nokia.com>
- *
- * Fixed MPU sleep some more
- * Juha Yrjola
- *
- * Copyright (C) 2005 Texas Instruments, Inc.
- * Richard Woodruff <r-woodruff2@ti.com>
- *
  * Based on pm.c for omap1
  *
  * This program is free software; you can redistribute it and/or modify
@@ -440,8 +434,6 @@ static struct subsys_attribute sleep_while_idle_attr = {
        .store  = omap_pm_sleep_while_idle_store,
 };
 
-extern struct subsystem power_subsys;
-
 static struct clk *osc_ck, *emul_ck;
 
 #define CONTROL_DEVCONF                __REG32(0x48000274)
@@ -487,9 +479,6 @@ void omap2_allow_sleep(void)
        BUG_ON(i < 0);
 }
 
-extern void omap2_gpio_prepare_for_retention(void);
-extern void omap2_gpio_resume_after_retention(void);
-
 static void omap2_enter_full_retention(void)
 {
        u32 sleep_time = 0;
index 5082496260432e8cd8e3d6d7a50be9524f500505..4493bcff51729a2e4340d0d196ce67e10a1611ca 100644 (file)
@@ -86,7 +86,8 @@ static int fbmem_region_reserved(unsigned long start, size_t size)
        return 0;
 }
 
-/* Get the region_idx`th region from board config/ATAG and convert it to
+/*
+ * Get the region_idx`th region from board config/ATAG and convert it to
  * our internal format.
  */
 static int get_fbmem_region(int region_idx, struct omapfb_mem_region *rg)
@@ -100,7 +101,8 @@ static int get_fbmem_region(int region_idx, struct omapfb_mem_region *rg)
                return -ENOENT;
 
        paddr = conf->start;
-       /* Low bits encode the page allocation mode, if high bits
+       /*
+        * Low bits encode the page allocation mode, if high bits
         * are zero. Otherwise we need a page aligned fixed
         * address.
         */
@@ -115,7 +117,8 @@ static int set_fbmem_region_type(struct omapfb_mem_region *rg, int mem_type,
                                  unsigned long mem_start,
                                  unsigned long mem_size)
 {
-       /* Check if the configuration specifies the type explicitly.
+       /*
+        * Check if the configuration specifies the type explicitly.
         * type = 0 && paddr = 0, a default don't care case maps to
         * the SDRAM type.
         */
@@ -150,7 +153,8 @@ static int check_fbmem_region(int region_idx, struct omapfb_mem_region *rg,
                /* Allocate this dynamically, leave paddr 0 for now. */
                return 0;
 
-       /* Fixed region for the given RAM range. Check if it's already
+       /*
+        * Fixed region for the given RAM range. Check if it's already
         * reserved by the FB code or someone else.
         */
        if (fbmem_region_reserved(paddr, size) ||
@@ -163,7 +167,8 @@ static int check_fbmem_region(int region_idx, struct omapfb_mem_region *rg,
        return 0;
 }
 
-/* Called from map_io. We need to call to this early enough so that we
+/*
+ * Called from map_io. We need to call to this early enough so that we
  * can reserve the fixed SDRAM regions before VM could get hold of them.
  */
 void omapfb_reserve_sdram(void)
@@ -213,7 +218,8 @@ void omapfb_reserve_sdram(void)
                         reserved);
 }
 
-/* Called at sram init time, before anything is pushed to the SRAM stack.
+/*
+ * Called at sram init time, before anything is pushed to the SRAM stack.
  * Because of the stack scheme, we will allocate everything from the
  * start of the lowest address region to the end of SRAM. This will also
  * include padding for page alignment and possible holes between regions.
@@ -271,13 +277,13 @@ unsigned long omapfb_reserve_sram(unsigned long sram_pstart,
                        size_avail = (size_avail - rg.size) & PAGE_MASK;
                        rg.paddr = pstart_avail + size_avail;
                }
-               /* Reserve everything above the start of the region.
-                */
+               /* Reserve everything above the start of the region. */
                if (pend_avail - rg.paddr > reserved)
                        reserved = pend_avail - rg.paddr;
                size_avail = pend_avail - reserved - pstart_avail;
 
-               /* We have a kernel mapping for this already, so the
+               /*
+                * We have a kernel mapping for this already, so the
                 * driver won't have to make one.
                 */
                rg.vaddr = (void *)(sram_vstart + rg.paddr - sram_pstart);
index 25ce5269626abc25b7b3b4c3c3a4e8f71574eb9b..bc46f33aede3dc5bc9ebe9394bde2183faa126ed 100644 (file)
@@ -57,7 +57,8 @@ extern unsigned long omapfb_reserve_sram(unsigned long sram_pstart,
                                         unsigned long pstart_avail,
                                         unsigned long size_avail);
 
-/* Depending on the target RAMFS firewall setup, the public usable amount of
+/*
+ * Depending on the target RAMFS firewall setup, the public usable amount of
  * SRAM varies.  The default accessable size for all device types is 2k. A GP
  * device allows ARM11 but not other initators for full size. This
  * functionality seems ok until some nice security API happens.
index 72deea203493b60675f46548a336d64196940ab6..a1ee877f4509d85b5080347d50aaaf92e3764180 100644 (file)
 
 #include <linux/types.h>
 
+extern void __init n800_flash_init(void);
+extern void __init n800_mmc_init(void);
+extern void __init n800_bt_init(void);
+extern void __init n800_audio_init(struct tsc2301_platform_data *);
+extern void __init n800_dsp_init(void);
+extern void __init n800_usb_init(void);
+extern void __init n800_pm_init(void);
+extern int n800_audio_enable(struct dsp_kfunc_device *kdev, int stage);
+extern int n800_audio_disable(struct dsp_kfunc_device *kdev, int stage);
+extern void n800_mmc_slot1_cover_handler(void *arg, int state);
+
 #define OMAP_TAG_NOKIA_BT      0x4e01
 #define OMAP_TAG_WLAN_CX3110X  0x4e02
 #define OMAP_TAG_CBUS          0x4e03
index 590917efc94acdecca3be6fad273f31b24a9ef41..c2ae7d867dd5d984a7d89e36a9ffad85a38c1dcf 100644 (file)
@@ -75,6 +75,8 @@ extern void omap_free_gpio(int gpio);
 extern void omap_set_gpio_direction(int gpio, int is_input);
 extern void omap_set_gpio_dataout(int gpio, int enable);
 extern int omap_get_gpio_datain(int gpio);
+extern void omap2_gpio_prepare_for_retention(void);
+extern void omap2_gpio_resume_after_retention(void);
 
 /*-------------------------------------------------------------------------*/
 
index 0fe920ac901723b64c647082888e5564a3731486..6a8e07ffc2d03431b5da8b43b6a67122a212c071 100644 (file)
@@ -82,6 +82,7 @@ struct gpmc_timings {
 
 extern unsigned int gpmc_ns_to_ticks(unsigned int time_ns);
 extern unsigned int gpmc_round_ns_to_ticks(unsigned int time_ns);
+extern unsigned long gpmc_get_fclk_period(void);
 
 extern void gpmc_cs_write_reg(int cs, int idx, u32 val);
 extern u32 gpmc_cs_read_reg(int cs, int idx);
index 0b75e3389e520b79f12ea847d6d55cef722335ec..34f971bf3bf6de2cdbbfc73726744591dedaa8d1 100644 (file)
 
 #include <linux/clk.h>
 
+extern struct subsystem power_subsys;
+
 extern void prevent_idle_sleep(void);
 extern void allow_idle_sleep(void);