Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: omap2: make functions static

A number of functions are only called from the file they
are defined in, so remove the extern declarations and
make them local to those files.

Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>

+39 -68
+1 -1
arch/arm/mach-omap2/board-n8x0.c
··· 504 504 } 505 505 #else 506 506 static struct omap_mmc_platform_data mmc1_data; 507 - void __init n8x0_mmc_init(void) 507 + static void __init n8x0_mmc_init(void) 508 508 { 509 509 } 510 510 #endif /* CONFIG_MMC_OMAP */
+2 -2
arch/arm/mach-omap2/clockdomain.c
··· 831 831 * -EINVAL if @clkdm is NULL or if clockdomain does not support 832 832 * software-initiated sleep; 0 upon success. 833 833 */ 834 - int clkdm_sleep_nolock(struct clockdomain *clkdm) 834 + static int clkdm_sleep_nolock(struct clockdomain *clkdm) 835 835 { 836 836 int ret; 837 837 ··· 885 885 * -EINVAL if @clkdm is NULL or if the clockdomain does not support 886 886 * software-controlled wakeup; 0 upon success. 887 887 */ 888 - int clkdm_wakeup_nolock(struct clockdomain *clkdm) 888 + static int clkdm_wakeup_nolock(struct clockdomain *clkdm) 889 889 { 890 890 int ret; 891 891
-2
arch/arm/mach-omap2/clockdomain.h
··· 204 204 void clkdm_deny_idle_nolock(struct clockdomain *clkdm); 205 205 void clkdm_deny_idle(struct clockdomain *clkdm); 206 206 207 - int clkdm_wakeup_nolock(struct clockdomain *clkdm); 208 207 int clkdm_wakeup(struct clockdomain *clkdm); 209 - int clkdm_sleep_nolock(struct clockdomain *clkdm); 210 208 int clkdm_sleep(struct clockdomain *clkdm); 211 209 212 210 int clkdm_clk_enable(struct clockdomain *clkdm, struct clk *clk);
+2 -2
arch/arm/mach-omap2/cm2xxx.c
··· 145 145 * (@prcm_mod, @idlest_id, @idlest_shift) is clocked. Return 0 upon 146 146 * success or -EBUSY if the module doesn't enable in time. 147 147 */ 148 - int omap2xxx_cm_wait_module_ready(u8 part, s16 prcm_mod, u16 idlest_id, 149 - u8 idlest_shift) 148 + static int omap2xxx_cm_wait_module_ready(u8 part, s16 prcm_mod, u16 idlest_id, 149 + u8 idlest_shift) 150 150 { 151 151 int ena = 0, i = 0; 152 152 u8 cm_idlest_reg;
-2
arch/arm/mach-omap2/cm2xxx.h
··· 46 46 extern void omap2xxx_cm_set_dpll_disable_autoidle(void); 47 47 extern void omap2xxx_cm_set_dpll_auto_low_power_stop(void); 48 48 49 - int omap2xxx_cm_wait_module_ready(u8 part, s16 prcm_mod, u16 idlest_id, 50 - u8 idlest_shift); 51 49 extern int omap2xxx_cm_fclks_active(void); 52 50 extern int omap2xxx_cm_mpu_retention_allowed(void); 53 51 extern u32 omap2xxx_cm_get_core_clk_src(void);
-2
arch/arm/mach-omap2/common.h
··· 106 106 void omap2430_init_early(void); 107 107 void omap3430_init_early(void); 108 108 void omap3630_init_early(void); 109 - void omap3_init_early(void); /* Do not use this one */ 110 109 void am33xx_init_early(void); 111 110 void am35xx_init_early(void); 112 111 void ti814x_init_early(void); ··· 119 120 void ti81xx_init_late(void); 120 121 void am33xx_init_late(void); 121 122 void omap5_init_late(void); 122 - int omap2_common_pm_late_init(void); 123 123 void dra7xx_init_early(void); 124 124 void dra7xx_init_late(void); 125 125
+1 -1
arch/arm/mach-omap2/id.c
··· 117 117 static void __iomem *tap_base; 118 118 static u16 tap_prod_id; 119 119 120 - void omap_get_die_id(struct omap_die_id *odi) 120 + static void omap_get_die_id(struct omap_die_id *odi) 121 121 { 122 122 if (soc_is_omap44xx() || soc_is_omap54xx() || soc_is_dra7xx()) { 123 123 odi->id_0 = read_tap_reg(OMAP_TAP_DIE_ID_44XX_0);
-2
arch/arm/mach-omap2/id.h
··· 14 14 u32 id_3; 15 15 }; 16 16 17 - void omap_get_die_id(struct omap_die_id *odi); 18 - 19 17 #endif
+1 -1
arch/arm/mach-omap2/io.c
··· 461 461 * same machine_id for 34xx and 36xx beagle.. Will get fixed with DT. 462 462 */ 463 463 #ifdef CONFIG_ARCH_OMAP3 464 - void __init omap3_init_early(void) 464 + static void __init omap3_init_early(void) 465 465 { 466 466 omap2_set_globals_tap(OMAP343X_CLASS, OMAP2_L4_IO_ADDRESS(0x4830A000)); 467 467 omap2_set_globals_sdrc(OMAP2_L3_IO_ADDRESS(OMAP343X_SDRC_BASE),
+1 -1
arch/arm/mach-omap2/omap-secure.c
··· 152 152 * NOTE: rx51_secure_dispatcher differs from omap_secure_dispatcher because 153 153 * it calling omap_smc3() instead omap_smc2() and param[0] is nargs+1 154 154 */ 155 - u32 rx51_secure_dispatcher(u32 idx, u32 process, u32 flag, u32 nargs, 155 + static u32 rx51_secure_dispatcher(u32 idx, u32 process, u32 flag, u32 nargs, 156 156 u32 arg1, u32 arg2, u32 arg3, u32 arg4) 157 157 { 158 158 static u32 param[5];
-2
arch/arm/mach-omap2/omap-secure.h
··· 74 74 extern u32 save_secure_ram_context(u32 args_pa); 75 75 extern u32 omap3_save_secure_ram(void *save_regs, int size); 76 76 77 - extern u32 rx51_secure_dispatcher(u32 idx, u32 process, u32 flag, u32 nargs, 78 - u32 arg1, u32 arg2, u32 arg3, u32 arg4); 79 77 extern u32 rx51_secure_update_aux_cr(u32 set_bits, u32 clear_bits); 80 78 extern u32 rx51_secure_rng_call(u32 ptr, u32 count, u32 flag); 81 79
+10 -4
arch/arm/mach-omap2/omap_device.c
··· 39 39 #include "omap_device.h" 40 40 #include "omap_hwmod.h" 41 41 42 + static struct omap_device *omap_device_alloc(struct platform_device *pdev, 43 + struct omap_hwmod **ohs, int oh_cnt); 44 + static void omap_device_delete(struct omap_device *od); 45 + static struct dev_pm_domain omap_device_fail_pm_domain; 46 + static struct dev_pm_domain omap_device_pm_domain; 47 + 42 48 /* Private functions */ 43 49 44 50 static void _add_clkdev(struct omap_device *od, const char *clk_alias, ··· 302 296 * 303 297 * Returns an struct omap_device pointer or ERR_PTR() on error; 304 298 */ 305 - struct omap_device *omap_device_alloc(struct platform_device *pdev, 299 + static struct omap_device *omap_device_alloc(struct platform_device *pdev, 306 300 struct omap_hwmod **ohs, int oh_cnt) 307 301 { 308 302 int ret = -ENOMEM; ··· 339 333 return ERR_PTR(ret); 340 334 } 341 335 342 - void omap_device_delete(struct omap_device *od) 336 + static void omap_device_delete(struct omap_device *od) 343 337 { 344 338 if (!od) 345 339 return; ··· 431 425 #define _od_resume_noirq NULL 432 426 #endif 433 427 434 - struct dev_pm_domain omap_device_fail_pm_domain = { 428 + static struct dev_pm_domain omap_device_fail_pm_domain = { 435 429 .ops = { 436 430 SET_RUNTIME_PM_OPS(_od_fail_runtime_suspend, 437 431 _od_fail_runtime_resume, NULL) 438 432 } 439 433 }; 440 434 441 - struct dev_pm_domain omap_device_pm_domain = { 435 + static struct dev_pm_domain omap_device_pm_domain = { 442 436 .ops = { 443 437 SET_RUNTIME_PM_OPS(_od_runtime_suspend, _od_runtime_resume, 444 438 NULL)
-9
arch/arm/mach-omap2/omap_device.h
··· 25 25 26 26 #include "omap_hwmod.h" 27 27 28 - extern struct dev_pm_domain omap_device_pm_domain; 29 - extern struct dev_pm_domain omap_device_fail_pm_domain; 30 - 31 28 /* omap_device._state values */ 32 29 #define OMAP_DEVICE_STATE_UNKNOWN 0 33 30 #define OMAP_DEVICE_STATE_ENABLED 1 ··· 62 65 63 66 int omap_device_enable(struct platform_device *pdev); 64 67 int omap_device_idle(struct platform_device *pdev); 65 - 66 - /* Core code interface */ 67 - 68 - struct omap_device *omap_device_alloc(struct platform_device *pdev, 69 - struct omap_hwmod **ohs, int oh_cnt); 70 - void omap_device_delete(struct omap_device *od); 71 68 72 69 /* Other */ 73 70
+3 -1
arch/arm/mach-omap2/omap_hwmod.c
··· 3054 3054 return 0; 3055 3055 } 3056 3056 3057 + static int __init omap_hwmod_setup_one(const char *oh_name); 3058 + 3057 3059 /** 3058 3060 * _ensure_mpu_hwmod_is_setup - ensure the MPU SS hwmod is init'ed and set up 3059 3061 * @oh: pointer to the hwmod currently being set up (usually not the MPU) ··· 3086 3084 * registered omap_hwmod. Also calls _setup() on each hwmod. Returns 3087 3085 * -EINVAL upon error or 0 upon success. 3088 3086 */ 3089 - int __init omap_hwmod_setup_one(const char *oh_name) 3087 + static int __init omap_hwmod_setup_one(const char *oh_name) 3090 3088 { 3091 3089 struct omap_hwmod *oh; 3092 3090
-1
arch/arm/mach-omap2/omap_hwmod.h
··· 615 615 int omap_hwmod_for_each(int (*fn)(struct omap_hwmod *oh, void *data), 616 616 void *data); 617 617 618 - int __init omap_hwmod_setup_one(const char *name); 619 618 int omap_hwmod_parse_module_range(struct omap_hwmod *oh, 620 619 struct device_node *np, 621 620 struct resource *res);
+1 -1
arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c
··· 62 62 .name = "iva", 63 63 }; 64 64 65 - struct omap_hwmod_class_sysconfig omap2_hdq1w_sysc = { 65 + static struct omap_hwmod_class_sysconfig omap2_hdq1w_sysc = { 66 66 .rev_offs = 0x0, 67 67 .sysc_offs = 0x14, 68 68 .syss_offs = 0x18,
+3 -3
arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c
··· 30 30 .sysc_fields = &omap_hwmod_sysc_type1, 31 31 }; 32 32 33 - struct omap_hwmod_class omap2_dispc_hwmod_class = { 33 + static struct omap_hwmod_class omap2_dispc_hwmod_class = { 34 34 .name = "dispc", 35 35 .sysc = &omap2_dispc_sysc, 36 36 }; ··· 47 47 .sysc_fields = &omap_hwmod_sysc_type1, 48 48 }; 49 49 50 - struct omap_hwmod_class omap2xxx_timer_hwmod_class = { 50 + static struct omap_hwmod_class omap2xxx_timer_hwmod_class = { 51 51 .name = "timer", 52 52 .sysc = &omap2xxx_timer_sysc, 53 53 }; ··· 67 67 .sysc_fields = &omap_hwmod_sysc_type1, 68 68 }; 69 69 70 - struct omap_hwmod_class omap2xxx_wd_timer_hwmod_class = { 70 + static struct omap_hwmod_class omap2xxx_wd_timer_hwmod_class = { 71 71 .name = "wd_timer", 72 72 .sysc = &omap2xxx_wd_timer_sysc, 73 73 .pre_shutdown = &omap2_wd_timer_disable,
-4
arch/arm/mach-omap2/omap_hwmod_common_data.h
··· 84 84 extern struct omap_hwmod_class iva_hwmod_class; 85 85 extern struct omap_hwmod_class omap2_uart_class; 86 86 extern struct omap_hwmod_class omap2_dss_hwmod_class; 87 - extern struct omap_hwmod_class omap2_dispc_hwmod_class; 88 87 extern struct omap_hwmod_class omap2_rfbi_hwmod_class; 89 88 extern struct omap_hwmod_class omap2_venc_hwmod_class; 90 - extern struct omap_hwmod_class_sysconfig omap2_hdq1w_sysc; 91 89 extern struct omap_hwmod_class omap2_hdq1w_class; 92 90 93 - extern struct omap_hwmod_class omap2xxx_timer_hwmod_class; 94 - extern struct omap_hwmod_class omap2xxx_wd_timer_hwmod_class; 95 91 extern struct omap_hwmod_class omap2xxx_gpio_hwmod_class; 96 92 extern struct omap_hwmod_class omap2xxx_mailbox_hwmod_class; 97 93 extern struct omap_hwmod_class omap2xxx_mcspi_class;
+1 -1
arch/arm/mach-omap2/pm.c
··· 134 134 135 135 int (*omap_pm_soc_init)(void); 136 136 137 - int __init omap2_common_pm_late_init(void) 137 + static int __init omap2_common_pm_late_init(void) 138 138 { 139 139 int error; 140 140
+4 -4
arch/arm/mach-omap2/powerdomain.c
··· 37 37 38 38 #define PWRDM_TRACE_STATES_FLAG (1<<31) 39 39 40 - void pwrdms_save_context(void); 41 - void pwrdms_restore_context(void); 40 + static void pwrdms_save_context(void); 41 + static void pwrdms_restore_context(void); 42 42 43 43 enum { 44 44 PWRDM_STATE_NOW = 0, ··· 1174 1174 return 0; 1175 1175 } 1176 1176 1177 - void pwrdms_save_context(void) 1177 + static void pwrdms_save_context(void) 1178 1178 { 1179 1179 pwrdm_for_each(pwrdm_save_context, NULL); 1180 1180 } 1181 1181 1182 - void pwrdms_restore_context(void) 1182 + static void pwrdms_restore_context(void) 1183 1183 { 1184 1184 pwrdm_for_each(pwrdm_restore_context, NULL); 1185 1185 }
-3
arch/arm/mach-omap2/powerdomain.h
··· 269 269 extern void pwrdm_lock(struct powerdomain *pwrdm); 270 270 extern void pwrdm_unlock(struct powerdomain *pwrdm); 271 271 272 - extern void pwrdms_save_context(void); 273 - extern void pwrdms_restore_context(void); 274 - 275 272 #endif
-1
arch/arm/mach-omap2/prcm-common.h
··· 550 550 struct device_node *np; 551 551 }; 552 552 553 - extern void omap_prcm_irq_cleanup(void); 554 553 extern int omap_prcm_register_chain_handler( 555 554 struct omap_prcm_irq_setup *irq_setup); 556 555 extern int omap_prcm_event_to_irq(const char *event);
-1
arch/arm/mach-omap2/prm.h
··· 16 16 extern struct omap_domain_base prm_base; 17 17 extern u16 prm_features; 18 18 int omap_prcm_init(void); 19 - int omap2_prm_base_init(void); 20 19 int omap2_prcm_base_init(void); 21 20 # endif 22 21
+3 -2
arch/arm/mach-omap2/prm3xxx.c
··· 32 32 static void omap3xxx_prm_ocp_barrier(void); 33 33 static void omap3xxx_prm_save_and_clear_irqen(u32 *saved_mask); 34 34 static void omap3xxx_prm_restore_irqen(u32 *saved_mask); 35 + static void omap3xxx_prm_iva_idle(void); 35 36 36 37 static const struct omap_prcm_irq omap3_prcm_irqs[] = { 37 38 OMAP_PRCM_IRQ("wkup", 0, 0), ··· 269 268 * Toggles the reset signal to modem IP block. Required to allow 270 269 * OMAP3430 without stacked modem to idle properly. 271 270 */ 272 - void __init omap3_prm_reset_modem(void) 271 + static void __init omap3_prm_reset_modem(void) 273 272 { 274 273 omap2_prm_write_mod_reg( 275 274 OMAP3430_RM_RSTCTRL_CORE_MODEM_SW_RSTPWRON_MASK | ··· 470 469 * function forces the IVA2 into idle state so it can go 471 470 * into retention/off and thus allow full-chip retention/off. 472 471 */ 473 - void omap3xxx_prm_iva_idle(void) 472 + static void omap3xxx_prm_iva_idle(void) 474 473 { 475 474 /* ensure IVA2 clock is disabled */ 476 475 omap2_cm_write_mod_reg(0, OMAP3430_IVA2_MOD, CM_FCLKEN);
-2
arch/arm/mach-omap2/prm3xxx.h
··· 138 138 extern u32 omap3_prm_vcvp_rmw(u32 mask, u32 bits, u8 offset); 139 139 140 140 int __init omap3xxx_prm_init(const struct omap_prcm_init_data *data); 141 - void omap3xxx_prm_iva_idle(void); 142 - void omap3_prm_reset_modem(void); 143 141 int omap3xxx_prm_clear_global_cold_reset(void); 144 142 void omap3_prm_save_scratchpad_contents(u32 *ptr); 145 143 void omap3_prm_init_pm(bool has_uart4, bool has_iva);
+2 -2
arch/arm/mach-omap2/prm_common.c
··· 187 187 * 188 188 * No return value. 189 189 */ 190 - void omap_prcm_irq_cleanup(void) 190 + static void omap_prcm_irq_cleanup(void) 191 191 { 192 192 unsigned int irq; 193 193 int i; ··· 689 689 * on the DT data. Returns 0 in success, negative error value 690 690 * otherwise. 691 691 */ 692 - int __init omap2_prm_base_init(void) 692 + static int __init omap2_prm_base_init(void) 693 693 { 694 694 struct device_node *np; 695 695 const struct of_device_id *match;
+1 -1
arch/arm/mach-omap2/sdrc.c
··· 45 45 * 46 46 * Save SMS registers that need to be restored after off mode. 47 47 */ 48 - void omap2_sms_save_context(void) 48 + static void omap2_sms_save_context(void) 49 49 { 50 50 sms_context.sms_sysconfig = sms_read_reg(SMS_SYSCONFIG); 51 51 }
-1
arch/arm/mach-omap2/sdrc.h
··· 80 80 struct omap_sdrc_params *sdrc_cs1) {}; 81 81 #endif 82 82 83 - void omap2_sms_save_context(void); 84 83 void omap2_sms_restore_context(void); 85 84 86 85 struct memory_timings {
+2 -4
arch/arm/mach-omap2/usb-tusb6010.c
··· 97 97 } 98 98 99 99 /* tusb driver calls this when it changes the chip's clocking */ 100 - int tusb6010_platform_retime(unsigned is_refclk) 100 + static int tusb6010_platform_retime(unsigned is_refclk) 101 101 { 102 102 static const char error[] = 103 103 KERN_ERR "tusb6010 %s retime error %d\n"; ··· 121 121 done: 122 122 return status; 123 123 } 124 - EXPORT_SYMBOL_GPL(tusb6010_platform_retime); 125 124 126 125 static struct resource tusb_resources[] = { 127 126 /* Order is significant! The start/end fields ··· 153 154 154 155 155 156 /* this may be called only from board-*.c setup code */ 156 - int __init 157 - tusb6010_setup_interface(struct musb_hdrc_platform_data *data, 157 + int __init tusb6010_setup_interface(struct musb_hdrc_platform_data *data, 158 158 unsigned ps_refclk, unsigned waitpin, 159 159 unsigned async, unsigned sync, 160 160 unsigned irq, unsigned dmachan)
+1 -1
arch/arm/mach-omap2/voltage.c
··· 67 67 * This API should be called by the kernel to do the voltage scaling 68 68 * for a particular voltage domain during DVFS. 69 69 */ 70 - int voltdm_scale(struct voltagedomain *voltdm, 70 + static int voltdm_scale(struct voltagedomain *voltdm, 71 71 unsigned long target_volt) 72 72 { 73 73 int ret, i;
-1
arch/arm/mach-omap2/voltage.h
··· 163 163 164 164 struct voltagedomain *voltdm_lookup(const char *name); 165 165 void voltdm_init(struct voltagedomain **voltdm_list); 166 - int voltdm_scale(struct voltagedomain *voltdm, unsigned long target_volt); 167 166 void voltdm_reset(struct voltagedomain *voltdm); 168 167 unsigned long voltdm_get_voltage(struct voltagedomain *voltdm); 169 168 #endif
-1
include/linux/platform_data/voltage-omap.h
··· 29 29 struct voltagedomain; 30 30 31 31 struct voltagedomain *voltdm_lookup(const char *name); 32 - int voltdm_scale(struct voltagedomain *voltdm, unsigned long target_volt); 33 32 unsigned long voltdm_get_voltage(struct voltagedomain *voltdm); 34 33 struct omap_volt_data *omap_voltage_get_voltdata(struct voltagedomain *voltdm, 35 34 unsigned long volt);
-2
include/linux/usb/musb.h
··· 143 143 unsigned async_cs, unsigned sync_cs, 144 144 unsigned irq, unsigned dmachan); 145 145 146 - extern int tusb6010_platform_retime(unsigned is_refclk); 147 - 148 146 #endif /* OMAP2 */ 149 147 150 148 #endif /* __LINUX_USB_MUSB_H */