From 8039de10aae3cd4cf0ef0ccebd58aff0e8810df2 Mon Sep 17 00:00:00 2001 From: Helge Deller Date: Tue, 10 Jan 2006 20:35:03 -0500 Subject: [PARISC] Add __read_mostly section for parisc Flag a whole bunch of things as __read_mostly on parisc. Also flag a few branches as unlikely() and cleanup a bit of code. Signed-off-by: Helge Deller Signed-off-by: Kyle McMartin --- drivers/parisc/led.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'drivers/parisc/led.c') diff --git a/drivers/parisc/led.c b/drivers/parisc/led.c index 315be4770d3..f357d3f6036 100644 --- a/drivers/parisc/led.c +++ b/drivers/parisc/led.c @@ -3,7 +3,7 @@ * * (c) Copyright 2000 Red Hat Software * (c) Copyright 2000 Helge Deller - * (c) Copyright 2001-2004 Helge Deller + * (c) Copyright 2001-2005 Helge Deller * (c) Copyright 2001 Randolph Chung * * This program is free software; you can redistribute it and/or modify @@ -56,13 +56,13 @@ relatively large amount of CPU time, some of the calculations can be turned off with the following variables (controlled via procfs) */ -static int led_type = -1; +static int led_type __read_mostly = -1; static unsigned char lastleds; /* LED state from most recent update */ -static unsigned int led_heartbeat = 1; -static unsigned int led_diskio = 1; -static unsigned int led_lanrxtx = 1; -static char lcd_text[32]; -static char lcd_text_default[32]; +static unsigned int led_heartbeat __read_mostly = 1; +static unsigned int led_diskio __read_mostly = 1; +static unsigned int led_lanrxtx __read_mostly = 1; +static char lcd_text[32] __read_mostly; +static char lcd_text_default[32] __read_mostly; static struct workqueue_struct *led_wq; @@ -108,7 +108,7 @@ struct pdc_chassis_lcd_info_ret_block { /* lcd_info is pre-initialized to the values needed to program KittyHawk LCD's * HP seems to have used Sharp/Hitachi HD44780 LCDs most of the time. */ static struct pdc_chassis_lcd_info_ret_block -lcd_info __attribute__((aligned(8))) = +lcd_info __attribute__((aligned(8))) __read_mostly = { .model = DISPLAY_MODEL_LCD, .lcd_width = 16, @@ -144,7 +144,7 @@ static int start_task(void) device_initcall(start_task); /* ptr to LCD/LED-specific function */ -static void (*led_func_ptr) (unsigned char); +static void (*led_func_ptr) (unsigned char) __read_mostly; #ifdef CONFIG_PROC_FS static int led_proc_read(char *page, char **start, off_t off, int count, -- cgit v1.2.3