Commit fd9c174c authored by Anton Blanchard's avatar Anton Blanchard

Merge samba.org:/home/anton/linux-2.5

into samba.org:/home/anton/ppc64tree
parents f409227f 113072fa
...@@ -72,6 +72,7 @@ Change history: ...@@ -72,6 +72,7 @@ Change history:
Version 0.9.8: Version 0.9.8:
* Support other i8xx chipsets by adding 82801E detection * Support other i8xx chipsets by adding 82801E detection
* 82801DB detection is the same as for 82801CA.
Version 0.9.7: Version 0.9.7:
* Support other i8xx chipsets too (by adding 82801BA(M) and * Support other i8xx chipsets too (by adding 82801BA(M) and
......
...@@ -290,7 +290,7 @@ static int __init elanfreq_init(void) ...@@ -290,7 +290,7 @@ static int __init elanfreq_init(void)
if (!driver) if (!driver)
return -ENOMEM; return -ENOMEM;
driver->policy = (struct cpufreq_policy *) (driver + sizeof(struct cpufreq_driver)); driver->policy = (struct cpufreq_policy *) (driver + 1);
if (!max_freq) if (!max_freq)
max_freq = elanfreq_get_cpu_frequency(); max_freq = elanfreq_get_cpu_frequency();
......
/* /*
* $Id: longhaul.c,v 1.70 2002/09/12 10:22:17 db Exp $ * $Id: longhaul.c,v 1.72 2002/09/29 23:43:10 db Exp $
* *
* (C) 2001 Dave Jones. <davej@suse.de> * (C) 2001 Dave Jones. <davej@suse.de>
* (C) 2002 Padraig Brady. <padraig@antefacto.com> * (C) 2002 Padraig Brady. <padraig@antefacto.com>
...@@ -771,7 +771,7 @@ static int __init longhaul_init (void) ...@@ -771,7 +771,7 @@ static int __init longhaul_init (void)
if (!driver) if (!driver)
return -ENOMEM; return -ENOMEM;
driver->policy = (struct cpufreq_policy *) (driver + sizeof(struct cpufreq_driver)); driver->policy = (struct cpufreq_policy *) (driver + 1);
#ifdef CONFIG_CPU_FREQ_24_API #ifdef CONFIG_CPU_FREQ_24_API
driver->cpu_min_freq = (unsigned int) lowest_speed; driver->cpu_min_freq = (unsigned int) lowest_speed;
......
/* /*
* $Id: longrun.c,v 1.10 2002/09/22 09:01:41 db Exp $ * $Id: longrun.c,v 1.12 2002/09/29 23:43:10 db Exp $
* *
* (C) 2002 Dominik Brodowski <linux@brodo.de> * (C) 2002 Dominik Brodowski <linux@brodo.de>
* *
...@@ -241,7 +241,7 @@ static int __init longrun_init(void) ...@@ -241,7 +241,7 @@ static int __init longrun_init(void)
if (!driver) if (!driver)
return -ENOMEM; return -ENOMEM;
driver->policy = (struct cpufreq_policy *) (driver + sizeof(struct cpufreq_driver)); driver->policy = (struct cpufreq_policy *) (driver + 1);
if (longrun_determine_freqs(&longrun_low_freq, &longrun_high_freq)) { if (longrun_determine_freqs(&longrun_low_freq, &longrun_high_freq)) {
kfree(driver); kfree(driver);
......
...@@ -225,7 +225,7 @@ int __init cpufreq_p4_init(void) ...@@ -225,7 +225,7 @@ int __init cpufreq_p4_init(void)
if (!driver) if (!driver)
return -ENOMEM; return -ENOMEM;
driver->policy = (struct cpufreq_policy *) (driver + sizeof(struct cpufreq_driver)); driver->policy = (struct cpufreq_policy *) (driver + 1);
if (!stock_freq) if (!stock_freq)
stock_freq = cpu_khz; stock_freq = cpu_khz;
......
/* /*
* $Id: powernow-k6.c,v 1.31 2002/09/21 09:05:29 db Exp $ * $Id: powernow-k6.c,v 1.33 2002/09/29 23:43:11 db Exp $
* This file was part of Powertweak Linux (http://powertweak.sf.net) * This file was part of Powertweak Linux (http://powertweak.sf.net)
* and is shared with the Linux Kernel module. * and is shared with the Linux Kernel module.
* *
...@@ -239,7 +239,7 @@ static int __init powernow_k6_init(void) ...@@ -239,7 +239,7 @@ static int __init powernow_k6_init(void)
release_region (POWERNOW_IOPORT, 16); release_region (POWERNOW_IOPORT, 16);
return -ENOMEM; return -ENOMEM;
} }
driver->policy = (struct cpufreq_policy *) (driver + sizeof(struct cpufreq_driver)); driver->policy = (struct cpufreq_policy *) (driver + 1);
#ifdef CONFIG_CPU_FREQ_24_API #ifdef CONFIG_CPU_FREQ_24_API
driver->cpu_min_freq = busfreq * 20; driver->cpu_min_freq = busfreq * 20;
......
/* /*
* $Id: speedstep.c,v 1.50 2002/09/22 08:16:25 db Exp $ * $Id: speedstep.c,v 1.53 2002/09/29 23:43:11 db Exp $
* *
* (C) 2001 Dave Jones, Arjan van de ven. * (C) 2001 Dave Jones, Arjan van de ven.
* (C) 2002 Dominik Brodowski <linux@brodo.de> * (C) 2002 Dominik Brodowski <linux@brodo.de>
...@@ -91,6 +91,7 @@ static unsigned int speedstep_high_freq; ...@@ -91,6 +91,7 @@ static unsigned int speedstep_high_freq;
*/ */
static int speedstep_get_state (unsigned int *state) static int speedstep_get_state (unsigned int *state)
{ {
unsigned long flags;
u32 pmbase; u32 pmbase;
u8 value; u8 value;
...@@ -110,9 +111,9 @@ static int speedstep_get_state (unsigned int *state) ...@@ -110,9 +111,9 @@ static int speedstep_get_state (unsigned int *state)
return -EIO; return -EIO;
/* read state */ /* read state */
local_irq_disable(); local_irq_save(flags);
value = inb(pmbase + 0x50); value = inb(pmbase + 0x50);
local_irq_enable(); local_irq_restore(flags);
dprintk(KERN_DEBUG "cpufreq: read at pmbase 0x%x + 0x50 returned 0x%x\n", pmbase, value); dprintk(KERN_DEBUG "cpufreq: read at pmbase 0x%x + 0x50 returned 0x%x\n", pmbase, value);
...@@ -132,7 +133,7 @@ static int speedstep_get_state (unsigned int *state) ...@@ -132,7 +133,7 @@ static int speedstep_get_state (unsigned int *state)
* *
* Tries to change the SpeedStep state. * Tries to change the SpeedStep state.
*/ */
static void speedstep_set_state (unsigned int state) static void speedstep_set_state (unsigned int state, int notify)
{ {
u32 pmbase; u32 pmbase;
u8 pm2_blk; u8 pm2_blk;
...@@ -154,7 +155,8 @@ static void speedstep_set_state (unsigned int state) ...@@ -154,7 +155,8 @@ static void speedstep_set_state (unsigned int state)
freqs.new = (state == SPEEDSTEP_HIGH) ? speedstep_high_freq : speedstep_low_freq; freqs.new = (state == SPEEDSTEP_HIGH) ? speedstep_high_freq : speedstep_low_freq;
freqs.cpu = CPUFREQ_ALL_CPUS; /* speedstep.c is UP only driver */ freqs.cpu = CPUFREQ_ALL_CPUS; /* speedstep.c is UP only driver */
cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); if (notify)
cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
switch (speedstep_chipset) { switch (speedstep_chipset) {
case SPEEDSTEP_CHIPSET_ICH2M: case SPEEDSTEP_CHIPSET_ICH2M:
...@@ -173,10 +175,11 @@ static void speedstep_set_state (unsigned int state) ...@@ -173,10 +175,11 @@ static void speedstep_set_state (unsigned int state)
return; return;
} }
/* Disable IRQs */
local_irq_save(flags);
/* read state */ /* read state */
local_irq_disable();
value = inb(pmbase + 0x50); value = inb(pmbase + 0x50);
local_irq_enable();
dprintk(KERN_DEBUG "cpufreq: read at pmbase 0x%x + 0x50 returned 0x%x\n", pmbase, value); dprintk(KERN_DEBUG "cpufreq: read at pmbase 0x%x + 0x50 returned 0x%x\n", pmbase, value);
...@@ -186,10 +189,6 @@ static void speedstep_set_state (unsigned int state) ...@@ -186,10 +189,6 @@ static void speedstep_set_state (unsigned int state)
dprintk(KERN_DEBUG "cpufreq: writing 0x%x to pmbase 0x%x + 0x50\n", value, pmbase); dprintk(KERN_DEBUG "cpufreq: writing 0x%x to pmbase 0x%x + 0x50\n", value, pmbase);
/* Disable IRQs */
local_irq_save(flags);
local_irq_disable();
/* Disable bus master arbitration */ /* Disable bus master arbitration */
pm2_blk = inb(pmbase + 0x20); pm2_blk = inb(pmbase + 0x20);
pm2_blk |= 0x01; pm2_blk |= 0x01;
...@@ -202,14 +201,11 @@ static void speedstep_set_state (unsigned int state) ...@@ -202,14 +201,11 @@ static void speedstep_set_state (unsigned int state)
pm2_blk &= 0xfe; pm2_blk &= 0xfe;
outb(pm2_blk, (pmbase + 0x20)); outb(pm2_blk, (pmbase + 0x20));
/* Enable IRQs */
local_irq_enable();
local_irq_restore(flags);
/* check if transition was sucessful */ /* check if transition was sucessful */
local_irq_disable();
value = inb(pmbase + 0x50); value = inb(pmbase + 0x50);
local_irq_enable();
/* Enable IRQs */
local_irq_restore(flags);
dprintk(KERN_DEBUG "cpufreq: read at pmbase 0x%x + 0x50 returned 0x%x\n", pmbase, value); dprintk(KERN_DEBUG "cpufreq: read at pmbase 0x%x + 0x50 returned 0x%x\n", pmbase, value);
...@@ -223,7 +219,8 @@ static void speedstep_set_state (unsigned int state) ...@@ -223,7 +219,8 @@ static void speedstep_set_state (unsigned int state)
printk (KERN_ERR "cpufreq: setting CPU frequency on this chipset unsupported.\n"); printk (KERN_ERR "cpufreq: setting CPU frequency on this chipset unsupported.\n");
} }
cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); if (notify)
cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
return; return;
} }
...@@ -526,10 +523,13 @@ static unsigned int speedstep_detect_processor (void) ...@@ -526,10 +523,13 @@ static unsigned int speedstep_detect_processor (void)
*/ */
static int speedstep_detect_speeds (void) static int speedstep_detect_speeds (void)
{ {
unsigned long flags;
unsigned int state; unsigned int state;
unsigned int low = 0, high = 0;
int i, result; int i, result;
/* Disable irqs for entire detection process */
local_irq_save(flags);
for (i=0; i<2; i++) { for (i=0; i<2; i++) {
/* read the current state */ /* read the current state */
result = speedstep_get_state(&state); result = speedstep_get_state(&state);
...@@ -541,31 +541,30 @@ static int speedstep_detect_speeds (void) ...@@ -541,31 +541,30 @@ static int speedstep_detect_speeds (void)
switch (speedstep_processor) { switch (speedstep_processor) {
case SPEEDSTEP_PROCESSOR_PIII_C: case SPEEDSTEP_PROCESSOR_PIII_C:
case SPEEDSTEP_PROCESSOR_PIII_T: case SPEEDSTEP_PROCESSOR_PIII_T:
low = pentium3_get_frequency(); speedstep_low_freq = pentium3_get_frequency();
break; break;
case SPEEDSTEP_PROCESSOR_P4M: case SPEEDSTEP_PROCESSOR_P4M:
low = pentium4_get_frequency(); speedstep_low_freq = pentium4_get_frequency();
} }
speedstep_set_state(SPEEDSTEP_HIGH); speedstep_set_state(SPEEDSTEP_HIGH, 0);
} else { } else {
switch (speedstep_processor) { switch (speedstep_processor) {
case SPEEDSTEP_PROCESSOR_PIII_C: case SPEEDSTEP_PROCESSOR_PIII_C:
case SPEEDSTEP_PROCESSOR_PIII_T: case SPEEDSTEP_PROCESSOR_PIII_T:
high = pentium3_get_frequency(); speedstep_high_freq = pentium3_get_frequency();
break; break;
case SPEEDSTEP_PROCESSOR_P4M: case SPEEDSTEP_PROCESSOR_P4M:
high = pentium4_get_frequency(); speedstep_high_freq = pentium4_get_frequency();
} }
speedstep_set_state(SPEEDSTEP_LOW); speedstep_set_state(SPEEDSTEP_LOW, 0);
} }
if (!low || !high ||
(speedstep_low_freq == speedstep_high_freq))
return -EIO;
} }
speedstep_low_freq = low; local_irq_restore(flags);
speedstep_high_freq = high;
if (!speedstep_low_freq || !speedstep_high_freq ||
(speedstep_low_freq == speedstep_high_freq))
return -EIO;
return 0; return 0;
} }
...@@ -583,16 +582,16 @@ static void speedstep_setpolicy (struct cpufreq_policy *policy) ...@@ -583,16 +582,16 @@ static void speedstep_setpolicy (struct cpufreq_policy *policy)
return; return;
if (policy->min > speedstep_low_freq) if (policy->min > speedstep_low_freq)
speedstep_set_state(SPEEDSTEP_HIGH); speedstep_set_state(SPEEDSTEP_HIGH, 1);
else { else {
if (policy->max < speedstep_high_freq) if (policy->max < speedstep_high_freq)
speedstep_set_state(SPEEDSTEP_LOW); speedstep_set_state(SPEEDSTEP_LOW, 1);
else { else {
/* both frequency states are allowed */ /* both frequency states are allowed */
if (policy->policy == CPUFREQ_POLICY_POWERSAVE) if (policy->policy == CPUFREQ_POLICY_POWERSAVE)
speedstep_set_state(SPEEDSTEP_LOW); speedstep_set_state(SPEEDSTEP_LOW, 1);
else else
speedstep_set_state(SPEEDSTEP_HIGH); speedstep_set_state(SPEEDSTEP_HIGH, 1);
} }
} }
} }
...@@ -649,7 +648,7 @@ static int __init speedstep_init(void) ...@@ -649,7 +648,7 @@ static int __init speedstep_init(void)
return -ENODEV; return -ENODEV;
} }
dprintk(KERN_INFO "cpufreq: Intel(R) SpeedStep(TM) support $Revision: 1.50 $\n"); dprintk(KERN_INFO "cpufreq: Intel(R) SpeedStep(TM) support $Revision: 1.53 $\n");
dprintk(KERN_DEBUG "cpufreq: chipset 0x%x - processor 0x%x\n", dprintk(KERN_DEBUG "cpufreq: chipset 0x%x - processor 0x%x\n",
speedstep_chipset, speedstep_processor); speedstep_chipset, speedstep_processor);
...@@ -659,8 +658,6 @@ static int __init speedstep_init(void) ...@@ -659,8 +658,6 @@ static int __init speedstep_init(void)
return result; return result;
/* detect low and high frequency */ /* detect low and high frequency */
speedstep_low_freq = 100000;
speedstep_high_freq = 200000;
result = speedstep_detect_speeds(); result = speedstep_detect_speeds();
if (result) if (result)
return result; return result;
...@@ -682,8 +679,8 @@ static int __init speedstep_init(void) ...@@ -682,8 +679,8 @@ static int __init speedstep_init(void)
if (!driver) if (!driver)
return -ENOMEM; return -ENOMEM;
driver->policy = (struct cpufreq_policy *) (driver + sizeof(struct cpufreq_driver)); driver->policy = (struct cpufreq_policy *) (driver + 1);
#ifdef CONFIG_CPU_FREQ_24_API #ifdef CONFIG_CPU_FREQ_24_API
driver->cpu_min_freq = speedstep_low_freq; driver->cpu_min_freq = speedstep_low_freq;
driver->cpu_cur_freq[0] = speed; driver->cpu_cur_freq[0] = speed;
......
...@@ -484,10 +484,7 @@ int request_irq(unsigned int irq, ...@@ -484,10 +484,7 @@ int request_irq(unsigned int irq,
* does not return until any executing interrupts for this IRQ * does not return until any executing interrupts for this IRQ
* have completed. * have completed.
* *
* This function may be called from interrupt context. * This function must not be called from interrupt context.
*
* Bugs: Attempting to free an irq in a handler for the same irq hangs
* the machine.
*/ */
void free_irq(unsigned int irq, void *dev_id) void free_irq(unsigned int irq, void *dev_id)
......
...@@ -626,7 +626,7 @@ time_cpufreq_notifier(struct notifier_block *nb, unsigned long val, ...@@ -626,7 +626,7 @@ time_cpufreq_notifier(struct notifier_block *nb, unsigned long val,
} }
for (i=0; i<NR_CPUS; i++) for (i=0; i<NR_CPUS; i++)
if ((freq->cpu == CPUFREQ_ALL_CPUS) || (freq->cpu == i)) if ((freq->cpu == CPUFREQ_ALL_CPUS) || (freq->cpu == i))
cpu_data[i].loops_per_jiffy = cpufreq_scale(loops_per_jiffy, freq->old, freq->new); cpu_data[i].loops_per_jiffy = cpufreq_scale(cpu_data[i].loops_per_jiffy, freq->old, freq->new);
break; break;
case CPUFREQ_POSTCHANGE: case CPUFREQ_POSTCHANGE:
...@@ -637,7 +637,7 @@ time_cpufreq_notifier(struct notifier_block *nb, unsigned long val, ...@@ -637,7 +637,7 @@ time_cpufreq_notifier(struct notifier_block *nb, unsigned long val,
} }
for (i=0; i<NR_CPUS; i++) for (i=0; i<NR_CPUS; i++)
if ((freq->cpu == CPUFREQ_ALL_CPUS) || (freq->cpu == i)) if ((freq->cpu == CPUFREQ_ALL_CPUS) || (freq->cpu == i))
cpu_data[i].loops_per_jiffy = cpufreq_scale(loops_per_jiffy, freq->old, freq->new); cpu_data[i].loops_per_jiffy = cpufreq_scale(cpu_data[i].loops_per_jiffy, freq->old, freq->new);
break; break;
} }
......
...@@ -53,8 +53,7 @@ else ...@@ -53,8 +53,7 @@ else
endif endif
endif endif
core-y += arch/ppc/kernel/ arch/ppc/platforms/ core-y += arch/ppc/kernel/ arch/ppc/platforms/ arch/ppc/mm/ arch/ppc/lib/
arch/ppc/mm/ arch/ppc/lib/
core-$(CONFIG_MATH_EMULATION) += arch/ppc/math-emu/ core-$(CONFIG_MATH_EMULATION) += arch/ppc/math-emu/
core-$(CONFIG_XMON) += arch/ppc/xmon/ core-$(CONFIG_XMON) += arch/ppc/xmon/
core-$(CONFIG_APUS) += arch/ppc/amiga/ core-$(CONFIG_APUS) += arch/ppc/amiga/
......
/* /*
* i810-tco 0.04: TCO timer driver for i8xx chipsets * i810-tco 0.05: TCO timer driver for i8xx chipsets
* *
* (c) Copyright 2000 kernel concepts <nils@kernelconcepts.de>, All Rights Reserved. * (c) Copyright 2000 kernel concepts <nils@kernelconcepts.de>, All Rights Reserved.
* http://www.kernelconcepts.de * http://www.kernelconcepts.de
...@@ -9,9 +9,9 @@ ...@@ -9,9 +9,9 @@
* as published by the Free Software Foundation; either version * as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version. * 2 of the License, or (at your option) any later version.
* *
* Neither kernel concepts nor Nils Faerber admit liability nor provide * Neither kernel concepts nor Nils Faerber admit liability nor provide
* warranty for any of this software. This material is provided * warranty for any of this software. This material is provided
* "AS-IS" and at no charge. * "AS-IS" and at no charge.
* *
* (c) Copyright 2000 kernel concepts <nils@kernelconcepts.de> * (c) Copyright 2000 kernel concepts <nils@kernelconcepts.de>
* developed for * developed for
...@@ -24,18 +24,25 @@ ...@@ -24,18 +24,25 @@
* (See the intel documentation on http://developer.intel.com.) * (See the intel documentation on http://developer.intel.com.)
* 82801AA & 82801AB chip : document number 290655-003, 290677-004, * 82801AA & 82801AB chip : document number 290655-003, 290677-004,
* 82801BA & 82801BAM chip : document number 290687-002, 298242-005, * 82801BA & 82801BAM chip : document number 290687-002, 298242-005,
* 82801CA & 82801CAM chip : document number 290716-001, 290718-001 * 82801CA & 82801CAM chip : document number 290716-001, 290718-001,
* 82801DB & 82801E chip : document number 290744-001, 273599-001
* *
* 20000710 Nils Faerber * 20000710 Nils Faerber
* Initial Version 0.01 * Initial Version 0.01
* 20000728 Nils Faerber * 20000728 Nils Faerber
* 0.02 Fix for SMI_EN->TCO_EN bit, some cleanups * 0.02 Fix for SMI_EN->TCO_EN bit, some cleanups
* 20011214 Matt Domsch <Matt_Domsch@dell.com> * 20011214 Matt Domsch <Matt_Domsch@dell.com>
* 0.03 Added nowayout module option to override CONFIG_WATCHDOG_NOWAYOUT * 0.03 Added nowayout module option to override CONFIG_WATCHDOG_NOWAYOUT
* Didn't add timeout option as i810_margin already exists. * Didn't add timeout option as i810_margin already exists.
* 20020224 Joel Becker, Wim Van Sebroeck * 20020224 Joel Becker, Wim Van Sebroeck
* 0.04 Support for 82801CA(M) chipset, timer margin needs to be > 3, * 0.04 Support for 82801CA(M) chipset, timer margin needs to be > 3,
* add support for WDIOC_SETTIMEOUT and WDIOC_GETTIMEOUT. * add support for WDIOC_SETTIMEOUT and WDIOC_GETTIMEOUT.
* 20020412 Rob Radez <rob@osinvestor.com>, Wim Van Sebroeck
* 0.05 Fix possible timer_alive race, add expect close support,
* clean up ioctls (WDIOC_GETSTATUS, WDIOC_GETBOOTSTATUS and
* WDIOC_SETOPTIONS), made i810tco_getdevice __init,
* removed boot_status, removed tco_timer_read,
* added support for 82801DB and 82801E chipset, general cleanup.
*/ */
#include <linux/module.h> #include <linux/module.h>
...@@ -55,9 +62,9 @@ ...@@ -55,9 +62,9 @@
/* Module and version information */ /* Module and version information */
#define TCO_VERSION "0.04" #define TCO_VERSION "0.05"
#define TCO_MODULE_NAME "i810 TCO timer" #define TCO_MODULE_NAME "i810 TCO timer"
#define TCO_DRIVER_NAME TCO_MODULE_NAME " , " TCO_VERSION #define TCO_DRIVER_NAME TCO_MODULE_NAME ", v" TCO_VERSION
/* Default expire timeout */ /* Default expire timeout */
#define TIMER_MARGIN 50 /* steps of 0.6sec, 3<n<64. Default is 30 seconds */ #define TIMER_MARGIN 50 /* steps of 0.6sec, 3<n<64. Default is 30 seconds */
...@@ -67,9 +74,8 @@ static spinlock_t tco_lock; /* Guards the hardware */ ...@@ -67,9 +74,8 @@ static spinlock_t tco_lock; /* Guards the hardware */
static int i810_margin = TIMER_MARGIN; /* steps of 0.6sec */ static int i810_margin = TIMER_MARGIN; /* steps of 0.6sec */
MODULE_PARM (i810_margin, "i"); MODULE_PARM(i810_margin, "i");
MODULE_PARM_DESC(i810_margin, "Watchdog timeout in steps of 0.6sec, 3<n<64. Default = 50 (30 seconds)"); MODULE_PARM_DESC(i810_margin, "i810-tco timeout in steps of 0.6sec, 3<n<64. Default = 50 (30 seconds)");
#ifdef CONFIG_WATCHDOG_NOWAYOUT #ifdef CONFIG_WATCHDOG_NOWAYOUT
static int nowayout = 1; static int nowayout = 1;
...@@ -85,8 +91,8 @@ MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=CON ...@@ -85,8 +91,8 @@ MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=CON
* Timer active flag * Timer active flag
*/ */
static int timer_alive; static unsigned long timer_alive;
static int boot_status; static char tco_expect_close;
/* /*
* Some TCO specific functions * Some TCO specific functions
...@@ -169,33 +175,20 @@ static void tco_timer_reload (void) ...@@ -169,33 +175,20 @@ static void tco_timer_reload (void)
spin_unlock(&tco_lock); spin_unlock(&tco_lock);
} }
/*
* Read the current timer value
*/
static unsigned char tco_timer_read (void)
{
return (inb (TCO1_RLD));
}
/* /*
* Allow only one person to hold it open * Allow only one person to hold it open
*/ */
static int i810tco_open (struct inode *inode, struct file *file) static int i810tco_open (struct inode *inode, struct file *file)
{ {
if (timer_alive) if (test_and_set_bit(0, &timer_alive))
return -EBUSY; return -EBUSY;
if (nowayout) {
MOD_INC_USE_COUNT;
}
/* /*
* Reload and activate timer * Reload and activate timer
*/ */
tco_timer_reload (); tco_timer_reload ();
tco_timer_start (); tco_timer_start ();
timer_alive = 1;
return 0; return 0;
} }
...@@ -204,10 +197,14 @@ static int i810tco_release (struct inode *inode, struct file *file) ...@@ -204,10 +197,14 @@ static int i810tco_release (struct inode *inode, struct file *file)
/* /*
* Shut off the timer. * Shut off the timer.
*/ */
if (nowayout) { if (tco_expect_close == 42 && !nowayout) {
tco_timer_stop (); tco_timer_stop ();
timer_alive = 0; } else {
tco_timer_reload ();
printk(KERN_CRIT TCO_MODULE_NAME ": Unexpected close, not stopping watchdog!\n");
} }
clear_bit(0, &timer_alive);
tco_expect_close = 0;
return 0; return 0;
} }
...@@ -218,10 +215,22 @@ static ssize_t i810tco_write (struct file *file, const char *data, ...@@ -218,10 +215,22 @@ static ssize_t i810tco_write (struct file *file, const char *data,
if (ppos != &file->f_pos) if (ppos != &file->f_pos)
return -ESPIPE; return -ESPIPE;
/* /* See if we got the magic character 'V' and reload the timer */
* Refresh the timer.
*/
if (len) { if (len) {
size_t i;
tco_expect_close = 0;
/* scan to see wether or not we got the magic character */
for (i = 0; i != len; i++) {
u8 c;
if(get_user(c, data+i))
return -EFAULT;
if (c == 'V')
tco_expect_close = 42;
}
/* someone wrote to us, we should reload the timer */
tco_timer_reload (); tco_timer_reload ();
return 1; return 1;
} }
...@@ -232,41 +241,53 @@ static int i810tco_ioctl (struct inode *inode, struct file *file, ...@@ -232,41 +241,53 @@ static int i810tco_ioctl (struct inode *inode, struct file *file,
unsigned int cmd, unsigned long arg) unsigned int cmd, unsigned long arg)
{ {
int new_margin, u_margin; int new_margin, u_margin;
int options, retval = -EINVAL;
static struct watchdog_info ident = { static struct watchdog_info ident = {
WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING, options: WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING,
0, firmware_version: 0,
"i810 TCO timer" identity: "i810 TCO timer",
}; };
switch (cmd) { switch (cmd) {
default: default:
return -ENOTTY; return -ENOTTY;
case WDIOC_GETSUPPORT: case WDIOC_GETSUPPORT:
if (copy_to_user if (copy_to_user
((struct watchdog_info *) arg, &ident, sizeof (ident))) ((struct watchdog_info *) arg, &ident, sizeof (ident)))
return -EFAULT; return -EFAULT;
return 0; return 0;
case WDIOC_GETSTATUS: case WDIOC_GETSTATUS:
return put_user (tco_timer_read (), case WDIOC_GETBOOTSTATUS:
(unsigned int *) (int) arg); return put_user (0, (int *) arg);
case WDIOC_GETBOOTSTATUS: case WDIOC_SETOPTIONS:
return put_user (boot_status, (int *) arg); if (get_user (options, (int *) arg))
case WDIOC_KEEPALIVE: return -EFAULT;
tco_timer_reload (); if (options & WDIOS_DISABLECARD) {
return 0; tco_timer_stop ();
case WDIOC_SETTIMEOUT: retval = 0;
if (get_user(u_margin, (int *) arg)) }
return -EFAULT; if (options & WDIOS_ENABLECARD) {
new_margin = (u_margin * 10 + 5) / 6; tco_timer_reload ();
if ((new_margin < 4) || (new_margin > 63)) tco_timer_start ();
return -EINVAL; retval = 0;
if (tco_timer_settimer((unsigned char)new_margin)) }
return -EINVAL; return retval;
i810_margin = new_margin; case WDIOC_KEEPALIVE:
tco_timer_reload(); tco_timer_reload ();
/* Fall */ return 0;
case WDIOC_GETTIMEOUT: case WDIOC_SETTIMEOUT:
return put_user((int)(i810_margin * 6 / 10), (int *) arg); if (get_user (u_margin, (int *) arg))
return -EFAULT;
new_margin = (u_margin * 10 + 5) / 6;
if ((new_margin < 4) || (new_margin > 63))
return -EINVAL;
if (tco_timer_settimer ((unsigned char) new_margin))
return -EINVAL;
i810_margin = new_margin;
tco_timer_reload ();
/* Fall */
case WDIOC_GETTIMEOUT:
return put_user ((int)(i810_margin * 6 / 10), (int *) arg);
} }
} }
...@@ -285,13 +306,15 @@ static struct pci_device_id i810tco_pci_tbl[] __initdata = { ...@@ -285,13 +306,15 @@ static struct pci_device_id i810tco_pci_tbl[] __initdata = {
{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801BA_10, PCI_ANY_ID, PCI_ANY_ID, }, { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801BA_10, PCI_ANY_ID, PCI_ANY_ID, },
{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_0, PCI_ANY_ID, PCI_ANY_ID, }, { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_0, PCI_ANY_ID, PCI_ANY_ID, },
{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_12, PCI_ANY_ID, PCI_ANY_ID, }, { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_12, PCI_ANY_ID, PCI_ANY_ID, },
{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_0, PCI_ANY_ID, PCI_ANY_ID, },
{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801E_0, PCI_ANY_ID, PCI_ANY_ID, },
{ 0, }, { 0, },
}; };
MODULE_DEVICE_TABLE (pci, i810tco_pci_tbl); MODULE_DEVICE_TABLE (pci, i810tco_pci_tbl);
static struct pci_dev *i810tco_pci; static struct pci_dev *i810tco_pci;
static unsigned char i810tco_getdevice (void) static unsigned char __init i810tco_getdevice (void)
{ {
struct pci_dev *dev; struct pci_dev *dev;
u8 val1, val2; u8 val1, val2;
...@@ -341,7 +364,6 @@ static unsigned char i810tco_getdevice (void) ...@@ -341,7 +364,6 @@ static unsigned char i810tco_getdevice (void)
outb (val1, SMI_EN + 1); outb (val1, SMI_EN + 1);
/* Clear out the (probably old) status */ /* Clear out the (probably old) status */
outb (0, TCO1_STS); outb (0, TCO1_STS);
boot_status = (int) inb (TCO2_STS);
outb (3, TCO2_STS); outb (3, TCO2_STS);
return 1; return 1;
} }
...@@ -357,9 +379,9 @@ static struct file_operations i810tco_fops = { ...@@ -357,9 +379,9 @@ static struct file_operations i810tco_fops = {
}; };
static struct miscdevice i810tco_miscdev = { static struct miscdevice i810tco_miscdev = {
WATCHDOG_MINOR, minor: WATCHDOG_MINOR,
"watchdog", name: "watchdog",
&i810tco_fops fops: &i810tco_fops,
}; };
static int __init watchdog_init (void) static int __init watchdog_init (void)
...@@ -382,8 +404,8 @@ static int __init watchdog_init (void) ...@@ -382,8 +404,8 @@ static int __init watchdog_init (void)
tco_timer_reload (); tco_timer_reload ();
printk (KERN_INFO TCO_DRIVER_NAME printk (KERN_INFO TCO_DRIVER_NAME
": timer margin: %d sec (0x%04x)\n", ": timer margin: %d sec (0x%04x) (nowayout=%d)\n",
(int) (i810_margin * 6 / 10), TCOBASE); (int) (i810_margin * 6 / 10), TCOBASE, nowayout);
return 0; return 0;
} }
...@@ -404,4 +426,6 @@ static void __exit watchdog_cleanup (void) ...@@ -404,4 +426,6 @@ static void __exit watchdog_cleanup (void)
module_init(watchdog_init); module_init(watchdog_init);
module_exit(watchdog_cleanup); module_exit(watchdog_cleanup);
MODULE_AUTHOR("Nils Faerber");
MODULE_DESCRIPTION("TCO timer driver for i8xx chipsets");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
/* /*
* i810-tco 0.04: TCO timer driver for i8xx chipsets * i810-tco 0.05: TCO timer driver for i8xx chipsets
* *
* (c) Copyright 2000 kernel concepts <nils@kernelconcepts.de>, All Rights Reserved. * (c) Copyright 2000 kernel concepts <nils@kernelconcepts.de>, All Rights Reserved.
* http://www.kernelconcepts.de * http://www.kernelconcepts.de
...@@ -9,9 +9,9 @@ ...@@ -9,9 +9,9 @@
* as published by the Free Software Foundation; either version * as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version. * 2 of the License, or (at your option) any later version.
* *
* Neither kernel concepts nor Nils Faerber admit liability nor provide * Neither kernel concepts nor Nils Faerber admit liability nor provide
* warranty for any of this software. This material is provided * warranty for any of this software. This material is provided
* "AS-IS" and at no charge. * "AS-IS" and at no charge.
* *
* (c) Copyright 2000 kernel concepts <nils@kernelconcepts.de> * (c) Copyright 2000 kernel concepts <nils@kernelconcepts.de>
* developed for * developed for
...@@ -20,13 +20,8 @@ ...@@ -20,13 +20,8 @@
* TCO timer driver for i8xx chipsets * TCO timer driver for i8xx chipsets
* based on softdog.c by Alan Cox <alan@redhat.com> * based on softdog.c by Alan Cox <alan@redhat.com>
* *
* The TCO timer is implemented in the following I/O controller hubs: * For history and the complete list of supported I/O Controller Hub's
* (See the intel documentation on http://developer.intel.com.) * see i810-tco.c
* 82801AA & 82801AB chip : document number 290655-003, 290677-004,
* 82801BA & 82801BAM chip : document number 290687-002, 298242-005,
* 82801CA & 82801CAM chip : document number 290716-001, 290718-001
*
* For history see i810-tco.c
*/ */
......
...@@ -2281,7 +2281,9 @@ EXPORT_SYMBOL(isapnp_resource_change); ...@@ -2281,7 +2281,9 @@ EXPORT_SYMBOL(isapnp_resource_change);
EXPORT_SYMBOL(isapnp_register_driver); EXPORT_SYMBOL(isapnp_register_driver);
EXPORT_SYMBOL(isapnp_unregister_driver); EXPORT_SYMBOL(isapnp_unregister_driver);
static struct device_driver isapnp_device_driver = {}; static struct device_driver isapnp_device_driver = {
.devices = LIST_HEAD_INIT(isapnp_device_driver.devices),
};
static inline int isapnp_init_device_tree(void) static inline int isapnp_init_device_tree(void)
{ {
......
...@@ -71,9 +71,9 @@ static int bfs_readdir(struct file * f, void * dirent, filldir_t filldir) ...@@ -71,9 +71,9 @@ static int bfs_readdir(struct file * f, void * dirent, filldir_t filldir)
} }
struct file_operations bfs_dir_operations = { struct file_operations bfs_dir_operations = {
read: generic_read_dir, .read = generic_read_dir,
readdir: bfs_readdir, .readdir = bfs_readdir,
fsync: file_fsync, .fsync = file_fsync,
}; };
extern void dump_imap(const char *, struct super_block *); extern void dump_imap(const char *, struct super_block *);
...@@ -263,11 +263,11 @@ static int bfs_rename(struct inode * old_dir, struct dentry * old_dentry, ...@@ -263,11 +263,11 @@ static int bfs_rename(struct inode * old_dir, struct dentry * old_dentry,
} }
struct inode_operations bfs_dir_inops = { struct inode_operations bfs_dir_inops = {
create: bfs_create, .create = bfs_create,
lookup: bfs_lookup, .lookup = bfs_lookup,
link: bfs_link, .link = bfs_link,
unlink: bfs_unlink, .unlink = bfs_unlink,
rename: bfs_rename, .rename = bfs_rename,
}; };
static int bfs_add_entry(struct inode * dir, const char * name, int namelen, int ino) static int bfs_add_entry(struct inode * dir, const char * name, int namelen, int ino)
......
...@@ -18,11 +18,11 @@ ...@@ -18,11 +18,11 @@
#endif #endif
struct file_operations bfs_file_operations = { struct file_operations bfs_file_operations = {
llseek: generic_file_llseek, .llseek = generic_file_llseek,
read: generic_file_read, .read = generic_file_read,
write: generic_file_write, .write = generic_file_write,
mmap: generic_file_mmap, .mmap = generic_file_mmap,
sendfile: generic_file_sendfile, .sendfile = generic_file_sendfile,
}; };
static int bfs_move_block(unsigned long from, unsigned long to, struct super_block *sb) static int bfs_move_block(unsigned long from, unsigned long to, struct super_block *sb)
...@@ -151,12 +151,12 @@ static int bfs_bmap(struct address_space *mapping, long block) ...@@ -151,12 +151,12 @@ static int bfs_bmap(struct address_space *mapping, long block)
} }
struct address_space_operations bfs_aops = { struct address_space_operations bfs_aops = {
readpage: bfs_readpage, .readpage = bfs_readpage,
writepage: bfs_writepage, .writepage = bfs_writepage,
sync_page: block_sync_page, .sync_page = block_sync_page,
prepare_write: bfs_prepare_write, .prepare_write = bfs_prepare_write,
commit_write: generic_commit_write, .commit_write = generic_commit_write,
bmap: bfs_bmap, .bmap = bfs_bmap,
}; };
struct inode_operations bfs_file_inops; struct inode_operations bfs_file_inops;
...@@ -253,14 +253,14 @@ static void destroy_inodecache(void) ...@@ -253,14 +253,14 @@ static void destroy_inodecache(void)
} }
static struct super_operations bfs_sops = { static struct super_operations bfs_sops = {
alloc_inode: bfs_alloc_inode, .alloc_inode = bfs_alloc_inode,
destroy_inode: bfs_destroy_inode, .destroy_inode = bfs_destroy_inode,
read_inode: bfs_read_inode, .read_inode = bfs_read_inode,
write_inode: bfs_write_inode, .write_inode = bfs_write_inode,
delete_inode: bfs_delete_inode, .delete_inode = bfs_delete_inode,
put_super: bfs_put_super, .put_super = bfs_put_super,
write_super: bfs_write_super, .write_super = bfs_write_super,
statfs: bfs_statfs, .statfs = bfs_statfs,
}; };
void dump_imap(const char *prefix, struct super_block * s) void dump_imap(const char *prefix, struct super_block * s)
...@@ -381,11 +381,11 @@ static struct super_block *bfs_get_sb(struct file_system_type *fs_type, ...@@ -381,11 +381,11 @@ static struct super_block *bfs_get_sb(struct file_system_type *fs_type,
} }
static struct file_system_type bfs_fs_type = { static struct file_system_type bfs_fs_type = {
owner: THIS_MODULE, .owner = THIS_MODULE,
name: "bfs", .name = "bfs",
get_sb: bfs_get_sb, .get_sb = bfs_get_sb,
kill_sb: kill_block_super, .kill_sb = kill_block_super,
fs_flags: FS_REQUIRES_DEV, .fs_flags = FS_REQUIRES_DEV,
}; };
static int __init init_bfs_fs(void) static int __init init_bfs_fs(void)
......
...@@ -435,7 +435,7 @@ static int cramfs_readpage(struct file *file, struct page * page) ...@@ -435,7 +435,7 @@ static int cramfs_readpage(struct file *file, struct page * page)
} }
static struct address_space_operations cramfs_aops = { static struct address_space_operations cramfs_aops = {
readpage: cramfs_readpage .readpage = cramfs_readpage
}; };
/* /*
...@@ -446,17 +446,17 @@ static struct address_space_operations cramfs_aops = { ...@@ -446,17 +446,17 @@ static struct address_space_operations cramfs_aops = {
* A directory can only readdir * A directory can only readdir
*/ */
static struct file_operations cramfs_directory_operations = { static struct file_operations cramfs_directory_operations = {
read: generic_read_dir, .read = generic_read_dir,
readdir: cramfs_readdir, .readdir = cramfs_readdir,
}; };
static struct inode_operations cramfs_dir_inode_operations = { static struct inode_operations cramfs_dir_inode_operations = {
lookup: cramfs_lookup, .lookup = cramfs_lookup,
}; };
static struct super_operations cramfs_ops = { static struct super_operations cramfs_ops = {
put_super: cramfs_put_super, .put_super = cramfs_put_super,
statfs: cramfs_statfs, .statfs = cramfs_statfs,
}; };
static struct super_block *cramfs_get_sb(struct file_system_type *fs_type, static struct super_block *cramfs_get_sb(struct file_system_type *fs_type,
...@@ -466,11 +466,11 @@ static struct super_block *cramfs_get_sb(struct file_system_type *fs_type, ...@@ -466,11 +466,11 @@ static struct super_block *cramfs_get_sb(struct file_system_type *fs_type,
} }
static struct file_system_type cramfs_fs_type = { static struct file_system_type cramfs_fs_type = {
owner: THIS_MODULE, .owner = THIS_MODULE,
name: "cramfs", .name = "cramfs",
get_sb: cramfs_get_sb, .get_sb = cramfs_get_sb,
kill_sb: kill_block_super, .kill_sb = kill_block_super,
fs_flags: FS_REQUIRES_DEV, .fs_flags = FS_REQUIRES_DEV,
}; };
static int __init init_cramfs_fs(void) static int __init init_cramfs_fs(void)
......
...@@ -27,7 +27,7 @@ static struct { ...@@ -27,7 +27,7 @@ static struct {
uid_t uid; uid_t uid;
gid_t gid; gid_t gid;
umode_t mode; umode_t mode;
} config = {mode: 0600}; } config = {.mode = 0600};
static int devpts_remount(struct super_block *sb, int *flags, char *data) static int devpts_remount(struct super_block *sb, int *flags, char *data)
{ {
...@@ -67,8 +67,8 @@ static int devpts_remount(struct super_block *sb, int *flags, char *data) ...@@ -67,8 +67,8 @@ static int devpts_remount(struct super_block *sb, int *flags, char *data)
} }
static struct super_operations devpts_sops = { static struct super_operations devpts_sops = {
statfs: simple_statfs, .statfs = simple_statfs,
remount_fs: devpts_remount, .remount_fs = devpts_remount,
}; };
static int devpts_fill_super(struct super_block *s, void *data, int silent) static int devpts_fill_super(struct super_block *s, void *data, int silent)
...@@ -110,10 +110,10 @@ static struct super_block *devpts_get_sb(struct file_system_type *fs_type, ...@@ -110,10 +110,10 @@ static struct super_block *devpts_get_sb(struct file_system_type *fs_type,
} }
static struct file_system_type devpts_fs_type = { static struct file_system_type devpts_fs_type = {
owner: THIS_MODULE, .owner = THIS_MODULE,
name: "devpts", .name = "devpts",
get_sb: devpts_get_sb, .get_sb = devpts_get_sb,
kill_sb: kill_anon_super, .kill_sb = kill_anon_super,
}; };
/* /*
......
...@@ -11,12 +11,12 @@ ...@@ -11,12 +11,12 @@
static int efs_readdir(struct file *, void *, filldir_t); static int efs_readdir(struct file *, void *, filldir_t);
struct file_operations efs_dir_operations = { struct file_operations efs_dir_operations = {
read: generic_read_dir, .read = generic_read_dir,
readdir: efs_readdir, .readdir = efs_readdir,
}; };
struct inode_operations efs_dir_inode_operations = { struct inode_operations efs_dir_inode_operations = {
lookup: efs_lookup, .lookup = efs_lookup,
}; };
static int efs_readdir(struct file *filp, void *dirent, filldir_t filldir) { static int efs_readdir(struct file *filp, void *dirent, filldir_t filldir) {
......
...@@ -24,9 +24,9 @@ static int _efs_bmap(struct address_space *mapping, long block) ...@@ -24,9 +24,9 @@ static int _efs_bmap(struct address_space *mapping, long block)
return generic_block_bmap(mapping,block,efs_get_block); return generic_block_bmap(mapping,block,efs_get_block);
} }
struct address_space_operations efs_aops = { struct address_space_operations efs_aops = {
readpage: efs_readpage, .readpage = efs_readpage,
sync_page: block_sync_page, .sync_page = block_sync_page,
bmap: _efs_bmap .bmap = _efs_bmap
}; };
static inline void extent_copy(efs_extent *src, efs_extent *dst) { static inline void extent_copy(efs_extent *src, efs_extent *dst) {
......
...@@ -21,11 +21,11 @@ static struct super_block *efs_get_sb(struct file_system_type *fs_type, ...@@ -21,11 +21,11 @@ static struct super_block *efs_get_sb(struct file_system_type *fs_type,
} }
static struct file_system_type efs_fs_type = { static struct file_system_type efs_fs_type = {
owner: THIS_MODULE, .owner = THIS_MODULE,
name: "efs", .name = "efs",
get_sb: efs_get_sb, .get_sb = efs_get_sb,
kill_sb: kill_block_super, .kill_sb = kill_block_super,
fs_flags: FS_REQUIRES_DEV, .fs_flags = FS_REQUIRES_DEV,
}; };
static kmem_cache_t * efs_inode_cachep; static kmem_cache_t * efs_inode_cachep;
...@@ -77,11 +77,11 @@ void efs_put_super(struct super_block *s) ...@@ -77,11 +77,11 @@ void efs_put_super(struct super_block *s)
} }
static struct super_operations efs_superblock_operations = { static struct super_operations efs_superblock_operations = {
alloc_inode: efs_alloc_inode, .alloc_inode = efs_alloc_inode,
destroy_inode: efs_destroy_inode, .destroy_inode = efs_destroy_inode,
read_inode: efs_read_inode, .read_inode = efs_read_inode,
put_super: efs_put_super, .put_super = efs_put_super,
statfs: efs_statfs, .statfs = efs_statfs,
}; };
static int __init init_efs_fs(void) { static int __init init_efs_fs(void) {
......
...@@ -54,5 +54,5 @@ static int efs_symlink_readpage(struct file *file, struct page *page) ...@@ -54,5 +54,5 @@ static int efs_symlink_readpage(struct file *file, struct page *page)
} }
struct address_space_operations efs_symlink_aops = { struct address_space_operations efs_symlink_aops = {
readpage: efs_symlink_readpage .readpage = efs_symlink_readpage
}; };
...@@ -514,12 +514,12 @@ static struct dentry *export_decode_fh(struct super_block *sb, __u32 *fh, int fh ...@@ -514,12 +514,12 @@ static struct dentry *export_decode_fh(struct super_block *sb, __u32 *fh, int fh
} }
struct export_operations export_op_default = { struct export_operations export_op_default = {
decode_fh: export_decode_fh, .decode_fh = export_decode_fh,
encode_fh: export_encode_fh, .encode_fh = export_encode_fh,
get_name: get_name, .get_name = get_name,
get_parent: get_parent, .get_parent = get_parent,
get_dentry: get_object, .get_dentry = get_object,
}; };
EXPORT_SYMBOL(export_op_default); EXPORT_SYMBOL(export_op_default);
......
...@@ -325,7 +325,7 @@ static int zisofs_readpage(struct file *file, struct page *page) ...@@ -325,7 +325,7 @@ static int zisofs_readpage(struct file *file, struct page *page)
} }
struct address_space_operations zisofs_aops = { struct address_space_operations zisofs_aops = {
readpage: zisofs_readpage, .readpage = zisofs_readpage,
/* No sync_page operation supported? */ /* No sync_page operation supported? */
/* No bmap operation supported */ /* No bmap operation supported */
}; };
......
...@@ -29,8 +29,8 @@ static int isofs_readdir(struct file *, void *, filldir_t); ...@@ -29,8 +29,8 @@ static int isofs_readdir(struct file *, void *, filldir_t);
struct file_operations isofs_dir_operations = struct file_operations isofs_dir_operations =
{ {
read: generic_read_dir, .read = generic_read_dir,
readdir: isofs_readdir, .readdir = isofs_readdir,
}; };
/* /*
...@@ -38,7 +38,7 @@ struct file_operations isofs_dir_operations = ...@@ -38,7 +38,7 @@ struct file_operations isofs_dir_operations =
*/ */
struct inode_operations isofs_dir_inode_operations = struct inode_operations isofs_dir_inode_operations =
{ {
lookup: isofs_lookup, .lookup = isofs_lookup,
}; };
int isofs_name_translate(struct iso_directory_record *de, char *new, struct inode *inode) int isofs_name_translate(struct iso_directory_record *de, char *new, struct inode *inode)
......
...@@ -124,11 +124,11 @@ static void destroy_inodecache(void) ...@@ -124,11 +124,11 @@ static void destroy_inodecache(void)
} }
static struct super_operations isofs_sops = { static struct super_operations isofs_sops = {
alloc_inode: isofs_alloc_inode, .alloc_inode = isofs_alloc_inode,
destroy_inode: isofs_destroy_inode, .destroy_inode = isofs_destroy_inode,
read_inode: isofs_read_inode, .read_inode = isofs_read_inode,
put_super: isofs_put_super, .put_super = isofs_put_super,
statfs: isofs_statfs, .statfs = isofs_statfs,
}; };
/* the export_operations structure for describing /* the export_operations structure for describing
...@@ -148,21 +148,21 @@ static struct export_operations isofs_export_ops = { ...@@ -148,21 +148,21 @@ static struct export_operations isofs_export_ops = {
static struct dentry_operations isofs_dentry_ops[] = { static struct dentry_operations isofs_dentry_ops[] = {
{ {
d_hash: isofs_hash, .d_hash = isofs_hash,
d_compare: isofs_dentry_cmp, .d_compare = isofs_dentry_cmp,
}, },
{ {
d_hash: isofs_hashi, .d_hash = isofs_hashi,
d_compare: isofs_dentry_cmpi, .d_compare = isofs_dentry_cmpi,
}, },
#ifdef CONFIG_JOLIET #ifdef CONFIG_JOLIET
{ {
d_hash: isofs_hash_ms, .d_hash = isofs_hash_ms,
d_compare: isofs_dentry_cmp_ms, .d_compare = isofs_dentry_cmp_ms,
}, },
{ {
d_hash: isofs_hashi_ms, .d_hash = isofs_hashi_ms,
d_compare: isofs_dentry_cmpi_ms, .d_compare = isofs_dentry_cmpi_ms,
} }
#endif #endif
}; };
...@@ -1063,9 +1063,9 @@ static int _isofs_bmap(struct address_space *mapping, long block) ...@@ -1063,9 +1063,9 @@ static int _isofs_bmap(struct address_space *mapping, long block)
} }
static struct address_space_operations isofs_aops = { static struct address_space_operations isofs_aops = {
readpage: isofs_readpage, .readpage = isofs_readpage,
sync_page: block_sync_page, .sync_page = block_sync_page,
bmap: _isofs_bmap .bmap = _isofs_bmap
}; };
static inline void test_and_set_uid(uid_t *p, uid_t value) static inline void test_and_set_uid(uid_t *p, uid_t value)
...@@ -1430,11 +1430,11 @@ static struct super_block *isofs_get_sb(struct file_system_type *fs_type, ...@@ -1430,11 +1430,11 @@ static struct super_block *isofs_get_sb(struct file_system_type *fs_type,
} }
static struct file_system_type iso9660_fs_type = { static struct file_system_type iso9660_fs_type = {
owner: THIS_MODULE, .owner = THIS_MODULE,
name: "iso9660", .name = "iso9660",
get_sb: isofs_get_sb, .get_sb = isofs_get_sb,
kill_sb: kill_block_super, .kill_sb = kill_block_super,
fs_flags: FS_REQUIRES_DEV, .fs_flags = FS_REQUIRES_DEV,
}; };
static int __init init_iso9660_fs(void) static int __init init_iso9660_fs(void)
......
...@@ -590,5 +590,5 @@ static int rock_ridge_symlink_readpage(struct file *file, struct page *page) ...@@ -590,5 +590,5 @@ static int rock_ridge_symlink_readpage(struct file *file, struct page *page)
} }
struct address_space_operations isofs_symlink_aops = { struct address_space_operations isofs_symlink_aops = {
readpage: rock_ridge_symlink_readpage .readpage = rock_ridge_symlink_readpage
}; };
...@@ -15,9 +15,9 @@ typedef struct minix_dir_entry minix_dirent; ...@@ -15,9 +15,9 @@ typedef struct minix_dir_entry minix_dirent;
static int minix_readdir(struct file *, void *, filldir_t); static int minix_readdir(struct file *, void *, filldir_t);
struct file_operations minix_dir_operations = { struct file_operations minix_dir_operations = {
read: generic_read_dir, .read = generic_read_dir,
readdir: minix_readdir, .readdir = minix_readdir,
fsync: minix_sync_file, .fsync = minix_sync_file,
}; };
static inline void dir_put_page(struct page *page) static inline void dir_put_page(struct page *page)
......
...@@ -16,17 +16,17 @@ ...@@ -16,17 +16,17 @@
int minix_sync_file(struct file *, struct dentry *, int); int minix_sync_file(struct file *, struct dentry *, int);
struct file_operations minix_file_operations = { struct file_operations minix_file_operations = {
llseek: generic_file_llseek, .llseek = generic_file_llseek,
read: generic_file_read, .read = generic_file_read,
write: generic_file_write, .write = generic_file_write,
mmap: generic_file_mmap, .mmap = generic_file_mmap,
fsync: minix_sync_file, .fsync = minix_sync_file,
sendfile: generic_file_sendfile, .sendfile = generic_file_sendfile,
}; };
struct inode_operations minix_file_inode_operations = { struct inode_operations minix_file_inode_operations = {
truncate: minix_truncate, .truncate = minix_truncate,
getattr: minix_getattr, .getattr = minix_getattr,
}; };
int minix_sync_file(struct file * file, struct dentry *dentry, int datasync) int minix_sync_file(struct file * file, struct dentry *dentry, int datasync)
......
...@@ -92,14 +92,14 @@ static void destroy_inodecache(void) ...@@ -92,14 +92,14 @@ static void destroy_inodecache(void)
} }
static struct super_operations minix_sops = { static struct super_operations minix_sops = {
alloc_inode: minix_alloc_inode, .alloc_inode = minix_alloc_inode,
destroy_inode: minix_destroy_inode, .destroy_inode = minix_destroy_inode,
read_inode: minix_read_inode, .read_inode = minix_read_inode,
write_inode: minix_write_inode, .write_inode = minix_write_inode,
delete_inode: minix_delete_inode, .delete_inode = minix_delete_inode,
put_super: minix_put_super, .put_super = minix_put_super,
statfs: minix_statfs, .statfs = minix_statfs,
remount_fs: minix_remount, .remount_fs = minix_remount,
}; };
static int minix_remount (struct super_block * sb, int * flags, char * data) static int minix_remount (struct super_block * sb, int * flags, char * data)
...@@ -333,18 +333,18 @@ static int minix_bmap(struct address_space *mapping, long block) ...@@ -333,18 +333,18 @@ static int minix_bmap(struct address_space *mapping, long block)
return generic_block_bmap(mapping,block,minix_get_block); return generic_block_bmap(mapping,block,minix_get_block);
} }
static struct address_space_operations minix_aops = { static struct address_space_operations minix_aops = {
readpage: minix_readpage, .readpage = minix_readpage,
writepage: minix_writepage, .writepage = minix_writepage,
sync_page: block_sync_page, .sync_page = block_sync_page,
prepare_write: minix_prepare_write, .prepare_write = minix_prepare_write,
commit_write: generic_commit_write, .commit_write = generic_commit_write,
bmap: minix_bmap .bmap = minix_bmap
}; };
static struct inode_operations minix_symlink_inode_operations = { static struct inode_operations minix_symlink_inode_operations = {
readlink: page_readlink, .readlink = page_readlink,
follow_link: page_follow_link, .follow_link = page_follow_link,
getattr: minix_getattr, .getattr = minix_getattr,
}; };
void minix_set_inode(struct inode *inode, dev_t rdev) void minix_set_inode(struct inode *inode, dev_t rdev)
...@@ -554,11 +554,11 @@ static struct super_block *minix_get_sb(struct file_system_type *fs_type, ...@@ -554,11 +554,11 @@ static struct super_block *minix_get_sb(struct file_system_type *fs_type,
} }
static struct file_system_type minix_fs_type = { static struct file_system_type minix_fs_type = {
owner: THIS_MODULE, .owner = THIS_MODULE,
name: "minix", .name = "minix",
get_sb: minix_get_sb, .get_sb = minix_get_sb,
kill_sb: kill_block_super, .kill_sb = kill_block_super,
fs_flags: FS_REQUIRES_DEV, .fs_flags = FS_REQUIRES_DEV,
}; };
static int __init init_minix_fs(void) static int __init init_minix_fs(void)
......
...@@ -51,7 +51,7 @@ static int minix_hash(struct dentry *dentry, struct qstr *qstr) ...@@ -51,7 +51,7 @@ static int minix_hash(struct dentry *dentry, struct qstr *qstr)
} }
struct dentry_operations minix_dentry_operations = { struct dentry_operations minix_dentry_operations = {
d_hash: minix_hash, .d_hash = minix_hash,
}; };
static struct dentry *minix_lookup(struct inode * dir, struct dentry *dentry) static struct dentry *minix_lookup(struct inode * dir, struct dentry *dentry)
...@@ -298,14 +298,14 @@ static int minix_rename(struct inode * old_dir, struct dentry *old_dentry, ...@@ -298,14 +298,14 @@ static int minix_rename(struct inode * old_dir, struct dentry *old_dentry,
* directories can handle most operations... * directories can handle most operations...
*/ */
struct inode_operations minix_dir_inode_operations = { struct inode_operations minix_dir_inode_operations = {
create: minix_create, .create = minix_create,
lookup: minix_lookup, .lookup = minix_lookup,
link: minix_link, .link = minix_link,
unlink: minix_unlink, .unlink = minix_unlink,
symlink: minix_symlink, .symlink = minix_symlink,
mkdir: minix_mkdir, .mkdir = minix_mkdir,
rmdir: minix_rmdir, .rmdir = minix_rmdir,
mknod: minix_mknod, .mknod = minix_mknod,
rename: minix_rename, .rename = minix_rename,
getattr: minix_getattr, .getattr = minix_getattr,
}; };
...@@ -582,28 +582,28 @@ int property_release (struct inode *inode, struct file *filp) ...@@ -582,28 +582,28 @@ int property_release (struct inode *inode, struct file *filp)
} }
static struct file_operations openpromfs_prop_ops = { static struct file_operations openpromfs_prop_ops = {
read: property_read, .read = property_read,
write: property_write, .write = property_write,
release: property_release, .release = property_release,
}; };
static struct file_operations openpromfs_nodenum_ops = { static struct file_operations openpromfs_nodenum_ops = {
read: nodenum_read, .read = nodenum_read,
}; };
static struct file_operations openprom_operations = { static struct file_operations openprom_operations = {
read: generic_read_dir, .read = generic_read_dir,
readdir: openpromfs_readdir, .readdir = openpromfs_readdir,
}; };
static struct inode_operations openprom_alias_inode_operations = { static struct inode_operations openprom_alias_inode_operations = {
create: openpromfs_create, .create = openpromfs_create,
lookup: openpromfs_lookup, .lookup = openpromfs_lookup,
unlink: openpromfs_unlink, .unlink = openpromfs_unlink,
}; };
static struct inode_operations openprom_inode_operations = { static struct inode_operations openprom_inode_operations = {
lookup: openpromfs_lookup, .lookup = openpromfs_lookup,
}; };
static int lookup_children(u16 n, const char * name, int len) static int lookup_children(u16 n, const char * name, int len)
...@@ -1026,8 +1026,8 @@ static void openprom_read_inode(struct inode * inode) ...@@ -1026,8 +1026,8 @@ static void openprom_read_inode(struct inode * inode)
} }
static struct super_operations openprom_sops = { static struct super_operations openprom_sops = {
read_inode: openprom_read_inode, .read_inode = openprom_read_inode,
statfs: simple_statfs, .statfs = simple_statfs,
}; };
static int openprom_fill_super(struct super_block *s, void *data, int silent) static int openprom_fill_super(struct super_block *s, void *data, int silent)
...@@ -1059,10 +1059,10 @@ static struct super_block *openprom_get_sb(struct file_system_type *fs_type, ...@@ -1059,10 +1059,10 @@ static struct super_block *openprom_get_sb(struct file_system_type *fs_type,
} }
static struct file_system_type openprom_fs_type = { static struct file_system_type openprom_fs_type = {
owner: THIS_MODULE, .owner = THIS_MODULE,
name: "openpromfs", .name = "openpromfs",
get_sb: openprom_get_sb, .get_sb = openprom_get_sb,
kill_sb: kill_anon_super, .kill_sb = kill_anon_super,
}; };
static int __init init_openprom_fs(void) static int __init init_openprom_fs(void)
......
...@@ -310,7 +310,7 @@ static ssize_t pid_maps_read(struct file * file, char * buf, ...@@ -310,7 +310,7 @@ static ssize_t pid_maps_read(struct file * file, char * buf,
} }
static struct file_operations proc_maps_operations = { static struct file_operations proc_maps_operations = {
read: pid_maps_read, .read = pid_maps_read,
}; };
extern struct seq_operations mounts_op; extern struct seq_operations mounts_op;
...@@ -347,10 +347,10 @@ static int mounts_release(struct inode *inode, struct file *file) ...@@ -347,10 +347,10 @@ static int mounts_release(struct inode *inode, struct file *file)
} }
static struct file_operations proc_mounts_operations = { static struct file_operations proc_mounts_operations = {
open: mounts_open, .open = mounts_open,
read: seq_read, .read = seq_read,
llseek: seq_lseek, .llseek = seq_lseek,
release: mounts_release, .release = mounts_release,
}; };
#define PROC_BLOCK_SIZE (3*1024) /* 4K page size but our output routines use some slack for overruns */ #define PROC_BLOCK_SIZE (3*1024) /* 4K page size but our output routines use some slack for overruns */
...@@ -390,7 +390,7 @@ static ssize_t proc_info_read(struct file * file, char * buf, ...@@ -390,7 +390,7 @@ static ssize_t proc_info_read(struct file * file, char * buf,
} }
static struct file_operations proc_info_file_operations = { static struct file_operations proc_info_file_operations = {
read: proc_info_read, .read = proc_info_read,
}; };
#define MAY_PTRACE(p) \ #define MAY_PTRACE(p) \
...@@ -509,13 +509,13 @@ static ssize_t mem_write(struct file * file, const char * buf, ...@@ -509,13 +509,13 @@ static ssize_t mem_write(struct file * file, const char * buf,
#endif #endif
static struct file_operations proc_mem_operations = { static struct file_operations proc_mem_operations = {
read: mem_read, .read = mem_read,
write: mem_write, .write = mem_write,
open: mem_open, .open = mem_open,
}; };
static struct inode_operations proc_mem_inode_operations = { static struct inode_operations proc_mem_inode_operations = {
permission: proc_permission, .permission = proc_permission,
}; };
static int proc_pid_follow_link(struct dentry *dentry, struct nameidata *nd) static int proc_pid_follow_link(struct dentry *dentry, struct nameidata *nd)
...@@ -587,8 +587,8 @@ static int proc_pid_readlink(struct dentry * dentry, char * buffer, int buflen) ...@@ -587,8 +587,8 @@ static int proc_pid_readlink(struct dentry * dentry, char * buffer, int buflen)
} }
static struct inode_operations proc_pid_link_inode_operations = { static struct inode_operations proc_pid_link_inode_operations = {
readlink: proc_pid_readlink, .readlink = proc_pid_readlink,
follow_link: proc_pid_follow_link .follow_link = proc_pid_follow_link
}; };
#define NUMBUF 10 #define NUMBUF 10
...@@ -823,21 +823,21 @@ static int pid_delete_dentry(struct dentry * dentry) ...@@ -823,21 +823,21 @@ static int pid_delete_dentry(struct dentry * dentry)
static struct dentry_operations pid_fd_dentry_operations = static struct dentry_operations pid_fd_dentry_operations =
{ {
d_revalidate: pid_fd_revalidate, .d_revalidate = pid_fd_revalidate,
d_delete: pid_delete_dentry, .d_delete = pid_delete_dentry,
}; };
static struct dentry_operations pid_dentry_operations = static struct dentry_operations pid_dentry_operations =
{ {
d_revalidate: pid_revalidate, .d_revalidate = pid_revalidate,
d_delete: pid_delete_dentry, .d_delete = pid_delete_dentry,
}; };
static struct dentry_operations pid_base_dentry_operations = static struct dentry_operations pid_base_dentry_operations =
{ {
d_revalidate: pid_revalidate, .d_revalidate = pid_revalidate,
d_iput: pid_base_iput, .d_iput = pid_base_iput,
d_delete: pid_delete_dentry, .d_delete = pid_delete_dentry,
}; };
/* Lookups */ /* Lookups */
...@@ -918,16 +918,16 @@ static struct dentry *proc_lookupfd(struct inode * dir, struct dentry * dentry) ...@@ -918,16 +918,16 @@ static struct dentry *proc_lookupfd(struct inode * dir, struct dentry * dentry)
} }
static struct file_operations proc_fd_operations = { static struct file_operations proc_fd_operations = {
read: generic_read_dir, .read = generic_read_dir,
readdir: proc_readfd, .readdir = proc_readfd,
}; };
/* /*
* proc directories can do almost nothing.. * proc directories can do almost nothing..
*/ */
static struct inode_operations proc_fd_inode_operations = { static struct inode_operations proc_fd_inode_operations = {
lookup: proc_lookupfd, .lookup = proc_lookupfd,
permission: proc_permission, .permission = proc_permission,
}; };
/* SMP-safe */ /* SMP-safe */
...@@ -1032,12 +1032,12 @@ static struct dentry *proc_base_lookup(struct inode *dir, struct dentry *dentry) ...@@ -1032,12 +1032,12 @@ static struct dentry *proc_base_lookup(struct inode *dir, struct dentry *dentry)
} }
static struct file_operations proc_base_operations = { static struct file_operations proc_base_operations = {
read: generic_read_dir, .read = generic_read_dir,
readdir: proc_base_readdir, .readdir = proc_base_readdir,
}; };
static struct inode_operations proc_base_inode_operations = { static struct inode_operations proc_base_inode_operations = {
lookup: proc_base_lookup, .lookup = proc_base_lookup,
}; };
/* /*
...@@ -1058,8 +1058,8 @@ static int proc_self_follow_link(struct dentry *dentry, struct nameidata *nd) ...@@ -1058,8 +1058,8 @@ static int proc_self_follow_link(struct dentry *dentry, struct nameidata *nd)
} }
static struct inode_operations proc_self_inode_operations = { static struct inode_operations proc_self_inode_operations = {
readlink: proc_self_readlink, .readlink = proc_self_readlink,
follow_link: proc_self_follow_link, .follow_link = proc_self_follow_link,
}; };
/* SMP-safe */ /* SMP-safe */
......
...@@ -33,9 +33,9 @@ int proc_match(int len, const char *name,struct proc_dir_entry * de) ...@@ -33,9 +33,9 @@ int proc_match(int len, const char *name,struct proc_dir_entry * de)
} }
static struct file_operations proc_file_operations = { static struct file_operations proc_file_operations = {
llseek: proc_file_lseek, .llseek = proc_file_lseek,
read: proc_file_read, .read = proc_file_read,
write: proc_file_write, .write = proc_file_write,
}; };
#ifndef MIN #ifndef MIN
...@@ -230,8 +230,8 @@ static int proc_follow_link(struct dentry *dentry, struct nameidata *nd) ...@@ -230,8 +230,8 @@ static int proc_follow_link(struct dentry *dentry, struct nameidata *nd)
} }
static struct inode_operations proc_link_inode_operations = { static struct inode_operations proc_link_inode_operations = {
readlink: proc_readlink, .readlink = proc_readlink,
follow_link: proc_follow_link, .follow_link = proc_follow_link,
}; };
/* /*
...@@ -247,7 +247,7 @@ static int proc_delete_dentry(struct dentry * dentry) ...@@ -247,7 +247,7 @@ static int proc_delete_dentry(struct dentry * dentry)
static struct dentry_operations proc_dentry_operations = static struct dentry_operations proc_dentry_operations =
{ {
d_delete: proc_delete_dentry, .d_delete = proc_delete_dentry,
}; };
/* /*
...@@ -359,15 +359,15 @@ out: unlock_kernel(); ...@@ -359,15 +359,15 @@ out: unlock_kernel();
* the /proc directory. * the /proc directory.
*/ */
static struct file_operations proc_dir_operations = { static struct file_operations proc_dir_operations = {
read: generic_read_dir, .read = generic_read_dir,
readdir: proc_readdir, .readdir = proc_readdir,
}; };
/* /*
* proc directories can do almost nothing.. * proc directories can do almost nothing..
*/ */
static struct inode_operations proc_dir_inode_operations = { static struct inode_operations proc_dir_inode_operations = {
lookup: proc_lookup, .lookup = proc_lookup,
}; };
static int proc_register(struct proc_dir_entry * dir, struct proc_dir_entry * dp) static int proc_register(struct proc_dir_entry * dir, struct proc_dir_entry * dp)
......
...@@ -130,12 +130,12 @@ int __init proc_init_inodecache(void) ...@@ -130,12 +130,12 @@ int __init proc_init_inodecache(void)
} }
static struct super_operations proc_sops = { static struct super_operations proc_sops = {
alloc_inode: proc_alloc_inode, .alloc_inode = proc_alloc_inode,
destroy_inode: proc_destroy_inode, .destroy_inode = proc_destroy_inode,
read_inode: proc_read_inode, .read_inode = proc_read_inode,
drop_inode: generic_delete_inode, .drop_inode = generic_delete_inode,
delete_inode: proc_delete_inode, .delete_inode = proc_delete_inode,
statfs: simple_statfs, .statfs = simple_statfs,
}; };
static int parse_options(char *options,uid_t *uid,gid_t *gid) static int parse_options(char *options,uid_t *uid,gid_t *gid)
......
...@@ -30,8 +30,8 @@ static int open_kcore(struct inode * inode, struct file * filp) ...@@ -30,8 +30,8 @@ static int open_kcore(struct inode * inode, struct file * filp)
static ssize_t read_kcore(struct file *, char *, size_t, loff_t *); static ssize_t read_kcore(struct file *, char *, size_t, loff_t *);
struct file_operations proc_kcore_operations = { struct file_operations proc_kcore_operations = {
read: read_kcore, .read = read_kcore,
open: open_kcore, .open = open_kcore,
}; };
#ifdef CONFIG_KCORE_AOUT #ifdef CONFIG_KCORE_AOUT
......
...@@ -46,8 +46,8 @@ static unsigned int kmsg_poll(struct file *file, poll_table * wait) ...@@ -46,8 +46,8 @@ static unsigned int kmsg_poll(struct file *file, poll_table * wait)
struct file_operations proc_kmsg_operations = { struct file_operations proc_kmsg_operations = {
read: kmsg_read, .read = kmsg_read,
poll: kmsg_poll, .poll = kmsg_poll,
open: kmsg_open, .open = kmsg_open,
release: kmsg_release, .release = kmsg_release,
}; };
...@@ -246,10 +246,10 @@ static int cpuinfo_open(struct inode *inode, struct file *file) ...@@ -246,10 +246,10 @@ static int cpuinfo_open(struct inode *inode, struct file *file)
return seq_open(file, &cpuinfo_op); return seq_open(file, &cpuinfo_op);
} }
static struct file_operations proc_cpuinfo_operations = { static struct file_operations proc_cpuinfo_operations = {
open: cpuinfo_open, .open = cpuinfo_open,
read: seq_read, .read = seq_read,
llseek: seq_lseek, .llseek = seq_lseek,
release: seq_release, .release = seq_release,
}; };
#ifdef CONFIG_PROC_HARDWARE #ifdef CONFIG_PROC_HARDWARE
...@@ -276,10 +276,10 @@ static int partitions_open(struct inode *inode, struct file *file) ...@@ -276,10 +276,10 @@ static int partitions_open(struct inode *inode, struct file *file)
return seq_open(file, &partitions_op); return seq_open(file, &partitions_op);
} }
static struct file_operations proc_partitions_operations = { static struct file_operations proc_partitions_operations = {
open: partitions_open, .open = partitions_open,
read: seq_read, .read = seq_read,
llseek: seq_lseek, .llseek = seq_lseek,
release: seq_release, .release = seq_release,
}; };
#ifdef CONFIG_MODULES #ifdef CONFIG_MODULES
...@@ -289,10 +289,10 @@ static int modules_open(struct inode *inode, struct file *file) ...@@ -289,10 +289,10 @@ static int modules_open(struct inode *inode, struct file *file)
return seq_open(file, &modules_op); return seq_open(file, &modules_op);
} }
static struct file_operations proc_modules_operations = { static struct file_operations proc_modules_operations = {
open: modules_open, .open = modules_open,
read: seq_read, .read = seq_read,
llseek: seq_lseek, .llseek = seq_lseek,
release: seq_release, .release = seq_release,
}; };
extern struct seq_operations ksyms_op; extern struct seq_operations ksyms_op;
static int ksyms_open(struct inode *inode, struct file *file) static int ksyms_open(struct inode *inode, struct file *file)
...@@ -300,10 +300,10 @@ static int ksyms_open(struct inode *inode, struct file *file) ...@@ -300,10 +300,10 @@ static int ksyms_open(struct inode *inode, struct file *file)
return seq_open(file, &ksyms_op); return seq_open(file, &ksyms_op);
} }
static struct file_operations proc_ksyms_operations = { static struct file_operations proc_ksyms_operations = {
open: ksyms_open, .open = ksyms_open,
read: seq_read, .read = seq_read,
llseek: seq_lseek, .llseek = seq_lseek,
release: seq_release, .release = seq_release,
}; };
#endif #endif
...@@ -314,11 +314,11 @@ static int slabinfo_open(struct inode *inode, struct file *file) ...@@ -314,11 +314,11 @@ static int slabinfo_open(struct inode *inode, struct file *file)
return seq_open(file, &slabinfo_op); return seq_open(file, &slabinfo_op);
} }
static struct file_operations proc_slabinfo_operations = { static struct file_operations proc_slabinfo_operations = {
open: slabinfo_open, .open = slabinfo_open,
read: seq_read, .read = seq_read,
write: slabinfo_write, .write = slabinfo_write,
llseek: seq_lseek, .llseek = seq_lseek,
release: seq_release, .release = seq_release,
}; };
static int kstat_read_proc(char *page, char **start, off_t off, static int kstat_read_proc(char *page, char **start, off_t off,
...@@ -456,10 +456,10 @@ static int interrupts_open(struct inode *inode, struct file *file) ...@@ -456,10 +456,10 @@ static int interrupts_open(struct inode *inode, struct file *file)
return res; return res;
} }
static struct file_operations proc_interrupts_operations = { static struct file_operations proc_interrupts_operations = {
open: interrupts_open, .open = interrupts_open,
read: seq_read, .read = seq_read,
llseek: seq_lseek, .llseek = seq_lseek,
release: single_release, .release = single_release,
}; };
static int filesystems_read_proc(char *page, char **start, off_t off, static int filesystems_read_proc(char *page, char **start, off_t off,
...@@ -587,8 +587,8 @@ static ssize_t write_profile(struct file * file, const char * buf, ...@@ -587,8 +587,8 @@ static ssize_t write_profile(struct file * file, const char * buf,
} }
static struct file_operations proc_profile_operations = { static struct file_operations proc_profile_operations = {
read: read_profile, .read = read_profile,
write: write_profile, .write = write_profile,
}; };
struct proc_dir_entry *proc_root_kcore; struct proc_dir_entry *proc_root_kcore;
......
...@@ -31,9 +31,9 @@ static struct super_block *proc_get_sb(struct file_system_type *fs_type, ...@@ -31,9 +31,9 @@ static struct super_block *proc_get_sb(struct file_system_type *fs_type,
} }
static struct file_system_type proc_fs_type = { static struct file_system_type proc_fs_type = {
name: "proc", .name = "proc",
get_sb: proc_get_sb, .get_sb = proc_get_sb,
kill_sb: kill_anon_super, .kill_sb = kill_anon_super,
}; };
extern int __init proc_init_inodecache(void); extern int __init proc_init_inodecache(void);
...@@ -122,29 +122,29 @@ static int proc_root_readdir(struct file * filp, ...@@ -122,29 +122,29 @@ static int proc_root_readdir(struct file * filp,
* directory handling functions for that.. * directory handling functions for that..
*/ */
static struct file_operations proc_root_operations = { static struct file_operations proc_root_operations = {
read: generic_read_dir, .read = generic_read_dir,
readdir: proc_root_readdir, .readdir = proc_root_readdir,
}; };
/* /*
* proc root can do almost nothing.. * proc root can do almost nothing..
*/ */
static struct inode_operations proc_root_inode_operations = { static struct inode_operations proc_root_inode_operations = {
lookup: proc_root_lookup, .lookup = proc_root_lookup,
}; };
/* /*
* This is the root "inode" in the /proc tree.. * This is the root "inode" in the /proc tree..
*/ */
struct proc_dir_entry proc_root = { struct proc_dir_entry proc_root = {
low_ino: PROC_ROOT_INO, .low_ino = PROC_ROOT_INO,
namelen: 5, .namelen = 5,
name: "/proc", .name = "/proc",
mode: S_IFDIR | S_IRUGO | S_IXUGO, .mode = S_IFDIR | S_IRUGO | S_IXUGO,
nlink: 2, .nlink = 2,
proc_iops: &proc_root_inode_operations, .proc_iops = &proc_root_inode_operations,
proc_fops: &proc_root_operations, .proc_fops = &proc_root_operations,
parent: &proc_root, .parent = &proc_root,
}; };
#ifdef CONFIG_SYSCTL #ifdef CONFIG_SYSCTL
......
...@@ -276,35 +276,35 @@ static int ramfs_sync_file(struct file * file, struct dentry *dentry, int datasy ...@@ -276,35 +276,35 @@ static int ramfs_sync_file(struct file * file, struct dentry *dentry, int datasy
} }
static struct address_space_operations ramfs_aops = { static struct address_space_operations ramfs_aops = {
readpage: ramfs_readpage, .readpage = ramfs_readpage,
writepage: fail_writepage, .writepage = fail_writepage,
prepare_write: ramfs_prepare_write, .prepare_write = ramfs_prepare_write,
commit_write: ramfs_commit_write .commit_write = ramfs_commit_write
}; };
static struct file_operations ramfs_file_operations = { static struct file_operations ramfs_file_operations = {
read: generic_file_read, .read = generic_file_read,
write: generic_file_write, .write = generic_file_write,
mmap: generic_file_mmap, .mmap = generic_file_mmap,
fsync: ramfs_sync_file, .fsync = ramfs_sync_file,
sendfile: generic_file_sendfile, .sendfile = generic_file_sendfile,
}; };
static struct inode_operations ramfs_dir_inode_operations = { static struct inode_operations ramfs_dir_inode_operations = {
create: ramfs_create, .create = ramfs_create,
lookup: simple_lookup, .lookup = simple_lookup,
link: ramfs_link, .link = ramfs_link,
unlink: ramfs_unlink, .unlink = ramfs_unlink,
symlink: ramfs_symlink, .symlink = ramfs_symlink,
mkdir: ramfs_mkdir, .mkdir = ramfs_mkdir,
rmdir: ramfs_rmdir, .rmdir = ramfs_rmdir,
mknod: ramfs_mknod, .mknod = ramfs_mknod,
rename: ramfs_rename, .rename = ramfs_rename,
}; };
static struct super_operations ramfs_ops = { static struct super_operations ramfs_ops = {
statfs: simple_statfs, .statfs = simple_statfs,
drop_inode: generic_delete_inode, .drop_inode = generic_delete_inode,
}; };
static int ramfs_fill_super(struct super_block * sb, void * data, int silent) static int ramfs_fill_super(struct super_block * sb, void * data, int silent)
...@@ -342,14 +342,14 @@ static struct super_block *rootfs_get_sb(struct file_system_type *fs_type, ...@@ -342,14 +342,14 @@ static struct super_block *rootfs_get_sb(struct file_system_type *fs_type,
} }
static struct file_system_type ramfs_fs_type = { static struct file_system_type ramfs_fs_type = {
name: "ramfs", .name = "ramfs",
get_sb: ramfs_get_sb, .get_sb = ramfs_get_sb,
kill_sb: kill_litter_super, .kill_sb = kill_litter_super,
}; };
static struct file_system_type rootfs_fs_type = { static struct file_system_type rootfs_fs_type = {
name: "rootfs", .name = "rootfs",
get_sb: rootfs_get_sb, .get_sb = rootfs_get_sb,
kill_sb: kill_litter_super, .kill_sb = kill_litter_super,
}; };
static int __init init_ramfs_fs(void) static int __init init_ramfs_fs(void)
......
...@@ -456,16 +456,16 @@ romfs_readpage(struct file *file, struct page * page) ...@@ -456,16 +456,16 @@ romfs_readpage(struct file *file, struct page * page)
/* Mapping from our types to the kernel */ /* Mapping from our types to the kernel */
static struct address_space_operations romfs_aops = { static struct address_space_operations romfs_aops = {
readpage: romfs_readpage .readpage = romfs_readpage
}; };
static struct file_operations romfs_dir_operations = { static struct file_operations romfs_dir_operations = {
read: generic_read_dir, .read = generic_read_dir,
readdir: romfs_readdir, .readdir = romfs_readdir,
}; };
static struct inode_operations romfs_dir_inode_operations = { static struct inode_operations romfs_dir_inode_operations = {
lookup: romfs_lookup, .lookup = romfs_lookup,
}; };
static mode_t romfs_modemap[] = static mode_t romfs_modemap[] =
...@@ -590,10 +590,10 @@ static void destroy_inodecache(void) ...@@ -590,10 +590,10 @@ static void destroy_inodecache(void)
} }
static struct super_operations romfs_ops = { static struct super_operations romfs_ops = {
alloc_inode: romfs_alloc_inode, .alloc_inode = romfs_alloc_inode,
destroy_inode: romfs_destroy_inode, .destroy_inode = romfs_destroy_inode,
read_inode: romfs_read_inode, .read_inode = romfs_read_inode,
statfs: romfs_statfs, .statfs = romfs_statfs,
}; };
static struct super_block *romfs_get_sb(struct file_system_type *fs_type, static struct super_block *romfs_get_sb(struct file_system_type *fs_type,
...@@ -603,11 +603,11 @@ static struct super_block *romfs_get_sb(struct file_system_type *fs_type, ...@@ -603,11 +603,11 @@ static struct super_block *romfs_get_sb(struct file_system_type *fs_type,
} }
static struct file_system_type romfs_fs_type = { static struct file_system_type romfs_fs_type = {
owner: THIS_MODULE, .owner = THIS_MODULE,
name: "romfs", .name = "romfs",
get_sb: romfs_get_sb, .get_sb = romfs_get_sb,
kill_sb: kill_block_super, .kill_sb = kill_block_super,
fs_flags: FS_REQUIRES_DEV, .fs_flags = FS_REQUIRES_DEV,
}; };
static int __init init_romfs_fs(void) static int __init init_romfs_fs(void)
......
...@@ -623,7 +623,7 @@ int ufs_empty_dir (struct inode * inode) ...@@ -623,7 +623,7 @@ int ufs_empty_dir (struct inode * inode)
} }
struct file_operations ufs_dir_operations = { struct file_operations ufs_dir_operations = {
read: generic_read_dir, .read = generic_read_dir,
readdir: ufs_readdir, .readdir = ufs_readdir,
fsync: file_fsync, .fsync = file_fsync,
}; };
...@@ -42,14 +42,14 @@ ...@@ -42,14 +42,14 @@
*/ */
struct file_operations ufs_file_operations = { struct file_operations ufs_file_operations = {
llseek: generic_file_llseek, .llseek = generic_file_llseek,
read: generic_file_read, .read = generic_file_read,
write: generic_file_write, .write = generic_file_write,
mmap: generic_file_mmap, .mmap = generic_file_mmap,
open: generic_file_open, .open = generic_file_open,
sendfile: generic_file_sendfile, .sendfile = generic_file_sendfile,
}; };
struct inode_operations ufs_file_inode_operations = { struct inode_operations ufs_file_inode_operations = {
truncate: ufs_truncate, .truncate = ufs_truncate,
}; };
...@@ -462,12 +462,12 @@ static int ufs_bmap(struct address_space *mapping, long block) ...@@ -462,12 +462,12 @@ static int ufs_bmap(struct address_space *mapping, long block)
return generic_block_bmap(mapping,block,ufs_getfrag_block); return generic_block_bmap(mapping,block,ufs_getfrag_block);
} }
struct address_space_operations ufs_aops = { struct address_space_operations ufs_aops = {
readpage: ufs_readpage, .readpage = ufs_readpage,
writepage: ufs_writepage, .writepage = ufs_writepage,
sync_page: block_sync_page, .sync_page = block_sync_page,
prepare_write: ufs_prepare_write, .prepare_write = ufs_prepare_write,
commit_write: generic_commit_write, .commit_write = generic_commit_write,
bmap: ufs_bmap .bmap = ufs_bmap
}; };
void ufs_read_inode (struct inode * inode) void ufs_read_inode (struct inode * inode)
......
...@@ -350,13 +350,13 @@ static int ufs_rename (struct inode * old_dir, struct dentry * old_dentry, ...@@ -350,13 +350,13 @@ static int ufs_rename (struct inode * old_dir, struct dentry * old_dentry,
} }
struct inode_operations ufs_dir_inode_operations = { struct inode_operations ufs_dir_inode_operations = {
create: ufs_create, .create = ufs_create,
lookup: ufs_lookup, .lookup = ufs_lookup,
link: ufs_link, .link = ufs_link,
unlink: ufs_unlink, .unlink = ufs_unlink,
symlink: ufs_symlink, .symlink = ufs_symlink,
mkdir: ufs_mkdir, .mkdir = ufs_mkdir,
rmdir: ufs_rmdir, .rmdir = ufs_rmdir,
mknod: ufs_mknod, .mknod = ufs_mknod,
rename: ufs_rename, .rename = ufs_rename,
}; };
...@@ -1041,15 +1041,15 @@ static void destroy_inodecache(void) ...@@ -1041,15 +1041,15 @@ static void destroy_inodecache(void)
} }
static struct super_operations ufs_super_ops = { static struct super_operations ufs_super_ops = {
alloc_inode: ufs_alloc_inode, .alloc_inode = ufs_alloc_inode,
destroy_inode: ufs_destroy_inode, .destroy_inode = ufs_destroy_inode,
read_inode: ufs_read_inode, .read_inode = ufs_read_inode,
write_inode: ufs_write_inode, .write_inode = ufs_write_inode,
delete_inode: ufs_delete_inode, .delete_inode = ufs_delete_inode,
put_super: ufs_put_super, .put_super = ufs_put_super,
write_super: ufs_write_super, .write_super = ufs_write_super,
statfs: ufs_statfs, .statfs = ufs_statfs,
remount_fs: ufs_remount, .remount_fs = ufs_remount,
}; };
static struct super_block *ufs_get_sb(struct file_system_type *fs_type, static struct super_block *ufs_get_sb(struct file_system_type *fs_type,
...@@ -1059,11 +1059,11 @@ static struct super_block *ufs_get_sb(struct file_system_type *fs_type, ...@@ -1059,11 +1059,11 @@ static struct super_block *ufs_get_sb(struct file_system_type *fs_type,
} }
static struct file_system_type ufs_fs_type = { static struct file_system_type ufs_fs_type = {
owner: THIS_MODULE, .owner = THIS_MODULE,
name: "ufs", .name = "ufs",
get_sb: ufs_get_sb, .get_sb = ufs_get_sb,
kill_sb: kill_block_super, .kill_sb = kill_block_super,
fs_flags: FS_REQUIRES_DEV, .fs_flags = FS_REQUIRES_DEV,
}; };
static int __init init_ufs_fs(void) static int __init init_ufs_fs(void)
......
...@@ -41,6 +41,6 @@ static int ufs_follow_link(struct dentry *dentry, struct nameidata *nd) ...@@ -41,6 +41,6 @@ static int ufs_follow_link(struct dentry *dentry, struct nameidata *nd)
} }
struct inode_operations ufs_fast_symlink_inode_operations = { struct inode_operations ufs_fast_symlink_inode_operations = {
readlink: ufs_readlink, .readlink = ufs_readlink,
follow_link: ufs_follow_link, .follow_link = ufs_follow_link,
}; };
...@@ -890,7 +890,6 @@ static int vfat_add_entry(struct inode *dir,struct qstr* qname, ...@@ -890,7 +890,6 @@ static int vfat_add_entry(struct inode *dir,struct qstr* qname,
struct msdos_dir_entry *dummy_de; struct msdos_dir_entry *dummy_de;
struct buffer_head *dummy_bh; struct buffer_head *dummy_bh;
int dummy_ino; int dummy_ino;
loff_t dummy;
dir_slots = (struct msdos_dir_slot *) dir_slots = (struct msdos_dir_slot *)
kmalloc(sizeof(struct msdos_dir_slot) * MSDOS_SLOTS, GFP_KERNEL); kmalloc(sizeof(struct msdos_dir_slot) * MSDOS_SLOTS, GFP_KERNEL);
...@@ -900,15 +899,6 @@ static int vfat_add_entry(struct inode *dir,struct qstr* qname, ...@@ -900,15 +899,6 @@ static int vfat_add_entry(struct inode *dir,struct qstr* qname,
len = qname->len; len = qname->len;
while (len && qname->name[len-1] == '.') while (len && qname->name[len-1] == '.')
len--; len--;
res = fat_search_long(dir, qname->name, len,
(MSDOS_SB(sb)->options.name_check != 's')
|| !MSDOS_SB(sb)->options.posixfs,
&dummy, &dummy);
if (res > 0) /* found */
res = -EEXIST;
if (res)
goto cleanup;
res = vfat_build_slots(dir, qname->name, len, res = vfat_build_slots(dir, qname->name, len,
dir_slots, &slots, is_dir); dir_slots, &slots, is_dir);
if (res < 0) if (res < 0)
......
...@@ -68,9 +68,9 @@ ...@@ -68,9 +68,9 @@
MSDOS_SB(s)->fat_bits == 16 ? BAD_FAT16 : BAD_FAT12) MSDOS_SB(s)->fat_bits == 16 ? BAD_FAT16 : BAD_FAT12)
/* standard EOF */ /* standard EOF */
#define EOF_FAT12 0xFF8 #define EOF_FAT12 0xFFF
#define EOF_FAT16 0xFFF8 #define EOF_FAT16 0xFFFF
#define EOF_FAT32 0xFFFFFF8 #define EOF_FAT32 0xFFFFFFF
#define EOF_FAT(s) (MSDOS_SB(s)->fat_bits == 32 ? EOF_FAT32 : \ #define EOF_FAT(s) (MSDOS_SB(s)->fat_bits == 32 ? EOF_FAT32 : \
MSDOS_SB(s)->fat_bits == 16 ? EOF_FAT16 : EOF_FAT12) MSDOS_SB(s)->fat_bits == 16 ? EOF_FAT16 : EOF_FAT12)
......
...@@ -211,6 +211,8 @@ extern void get_page_state(struct page_state *ret); ...@@ -211,6 +211,8 @@ extern void get_page_state(struct page_state *ret);
extern struct address_space swapper_space; extern struct address_space swapper_space;
#define PageSwapCache(page) ((page)->mapping == &swapper_space) #define PageSwapCache(page) ((page)->mapping == &swapper_space)
struct page; /* forward declaration */
int test_clear_page_dirty(struct page *page); int test_clear_page_dirty(struct page *page);
static inline void clear_page_dirty(struct page *page) static inline void clear_page_dirty(struct page *page)
......
...@@ -1713,8 +1713,13 @@ ...@@ -1713,8 +1713,13 @@
#define PCI_DEVICE_ID_INTEL_82801BA_9 0x244b #define PCI_DEVICE_ID_INTEL_82801BA_9 0x244b
#define PCI_DEVICE_ID_INTEL_82801BA_10 0x244c #define PCI_DEVICE_ID_INTEL_82801BA_10 0x244c
#define PCI_DEVICE_ID_INTEL_82801BA_11 0x244e #define PCI_DEVICE_ID_INTEL_82801BA_11 0x244e
#define PCI_DEVICE_ID_INTEL_82801E_0 0x2450
#define PCI_DEVICE_ID_INTEL_82801E_2 0x2452
#define PCI_DEVICE_ID_INTEL_82801E_3 0x2453
#define PCI_DEVICE_ID_INTEL_82801E_9 0x245b #define PCI_DEVICE_ID_INTEL_82801E_9 0x245b
#define PCI_DEVICE_ID_INTEL_82801E_11 PCI_DEVICE_ID_INTEL_82801E_9 #define PCI_DEVICE_ID_INTEL_82801E_11 PCI_DEVICE_ID_INTEL_82801E_9
#define PCI_DEVICE_ID_INTEL_82801E_13 0x245d
#define PCI_DEVICE_ID_INTEL_82801E_14 0x245e
#define PCI_DEVICE_ID_INTEL_82801CA_0 0x2480 #define PCI_DEVICE_ID_INTEL_82801CA_0 0x2480
#define PCI_DEVICE_ID_INTEL_82801CA_2 0x2482 #define PCI_DEVICE_ID_INTEL_82801CA_2 0x2482
#define PCI_DEVICE_ID_INTEL_82801CA_3 0x2483 #define PCI_DEVICE_ID_INTEL_82801CA_3 0x2483
...@@ -1725,8 +1730,16 @@ ...@@ -1725,8 +1730,16 @@
#define PCI_DEVICE_ID_INTEL_82801CA_10 0x248a #define PCI_DEVICE_ID_INTEL_82801CA_10 0x248a
#define PCI_DEVICE_ID_INTEL_82801CA_11 0x248b #define PCI_DEVICE_ID_INTEL_82801CA_11 0x248b
#define PCI_DEVICE_ID_INTEL_82801CA_12 0x248c #define PCI_DEVICE_ID_INTEL_82801CA_12 0x248c
#define PCI_DEVICE_ID_INTEL_82801DB_0 0x24c0
#define PCI_DEVICE_ID_INTEL_82801DB_2 0x24c2
#define PCI_DEVICE_ID_INTEL_82801DB_3 0x24c3
#define PCI_DEVICE_ID_INTEL_82801DB_4 0x24c4
#define PCI_DEVICE_ID_INTEL_82801DB_5 0x24c5
#define PCI_DEVICE_ID_INTEL_82801DB_6 0x24c6
#define PCI_DEVICE_ID_INTEL_82801DB_7 0x24c7
#define PCI_DEVICE_ID_INTEL_82801DB_9 0x24cb #define PCI_DEVICE_ID_INTEL_82801DB_9 0x24cb
#define PCI_DEVICE_ID_INTEL_82801DB_11 PCI_DEVICE_ID_INTEL_82801DB_9 #define PCI_DEVICE_ID_INTEL_82801DB_11 PCI_DEVICE_ID_INTEL_82801DB_9
#define PCI_DEVICE_ID_INTEL_82801DB_13 0x24cd
#define PCI_DEVICE_ID_INTEL_82820_HB 0x2500 #define PCI_DEVICE_ID_INTEL_82820_HB 0x2500
#define PCI_DEVICE_ID_INTEL_82820_UP_HB 0x2501 #define PCI_DEVICE_ID_INTEL_82820_UP_HB 0x2501
#define PCI_DEVICE_ID_INTEL_82850_HB 0x2530 #define PCI_DEVICE_ID_INTEL_82850_HB 0x2530
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment