aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/lasat/sysctl.c
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2005-09-08 01:45:47 -0400
committerLen Brown <len.brown@intel.com>2005-09-08 01:45:47 -0400
commit64e47488c913ac704d465a6af86a26786d1412a5 (patch)
treed3b0148592963dcde26e4bb35ddfec8b1eaf8e23 /arch/mips/lasat/sysctl.c
parent4a35a46bf1cda4737c428380d1db5d15e2590d18 (diff)
parentcaf39e87cc1182f7dae84eefc43ca14d54c78ef9 (diff)
Merge linux-2.6 with linux-acpi-2.6
Diffstat (limited to 'arch/mips/lasat/sysctl.c')
-rw-r--r--arch/mips/lasat/sysctl.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/arch/mips/lasat/sysctl.c b/arch/mips/lasat/sysctl.c
index 1c0cc620a43f..8ff43a1c1e99 100644
--- a/arch/mips/lasat/sysctl.c
+++ b/arch/mips/lasat/sysctl.c
@@ -37,14 +37,14 @@
37 37
38static DECLARE_MUTEX(lasat_info_sem); 38static DECLARE_MUTEX(lasat_info_sem);
39 39
40/* Strategy function to write EEPROM after changing string entry */ 40/* Strategy function to write EEPROM after changing string entry */
41int sysctl_lasatstring(ctl_table *table, int *name, int nlen, 41int sysctl_lasatstring(ctl_table *table, int *name, int nlen,
42 void *oldval, size_t *oldlenp, 42 void *oldval, size_t *oldlenp,
43 void *newval, size_t newlen, void **context) 43 void *newval, size_t newlen, void **context)
44{ 44{
45 int r; 45 int r;
46 down(&lasat_info_sem); 46 down(&lasat_info_sem);
47 r = sysctl_string(table, name, 47 r = sysctl_string(table, name,
48 nlen, oldval, oldlenp, newval, newlen, context); 48 nlen, oldval, oldlenp, newval, newlen, context);
49 if (r < 0) { 49 if (r < 0) {
50 up(&lasat_info_sem); 50 up(&lasat_info_sem);
@@ -74,7 +74,7 @@ int proc_dolasatstring(ctl_table *table, int write, struct file *filp,
74 return 0; 74 return 0;
75} 75}
76 76
77/* proc function to write EEPROM after changing int entry */ 77/* proc function to write EEPROM after changing int entry */
78int proc_dolasatint(ctl_table *table, int write, struct file *filp, 78int proc_dolasatint(ctl_table *table, int write, struct file *filp,
79 void *buffer, size_t *lenp, loff_t *ppos) 79 void *buffer, size_t *lenp, loff_t *ppos)
80{ 80{
@@ -93,7 +93,7 @@ int proc_dolasatint(ctl_table *table, int write, struct file *filp,
93static int rtctmp; 93static int rtctmp;
94 94
95#ifdef CONFIG_DS1603 95#ifdef CONFIG_DS1603
96/* proc function to read/write RealTime Clock */ 96/* proc function to read/write RealTime Clock */
97int proc_dolasatrtc(ctl_table *table, int write, struct file *filp, 97int proc_dolasatrtc(ctl_table *table, int write, struct file *filp,
98 void *buffer, size_t *lenp, loff_t *ppos) 98 void *buffer, size_t *lenp, loff_t *ppos)
99{ 99{
@@ -165,9 +165,9 @@ static char lasat_bcastaddr[16];
165void update_bcastaddr(void) 165void update_bcastaddr(void)
166{ 166{
167 unsigned int ip; 167 unsigned int ip;
168 168
169 ip = (lasat_board_info.li_eeprom_info.ipaddr & 169 ip = (lasat_board_info.li_eeprom_info.ipaddr &
170 lasat_board_info.li_eeprom_info.netmask) | 170 lasat_board_info.li_eeprom_info.netmask) |
171 ~lasat_board_info.li_eeprom_info.netmask; 171 ~lasat_board_info.li_eeprom_info.netmask;
172 172
173 sprintf(lasat_bcastaddr, "%d.%d.%d.%d", 173 sprintf(lasat_bcastaddr, "%d.%d.%d.%d",
@@ -205,7 +205,7 @@ int proc_lasat_ip(ctl_table *table, int write, struct file *filp,
205 break; 205 break;
206 len++; 206 len++;
207 } 207 }
208 if (len >= sizeof(proc_lasat_ipbuf)-1) 208 if (len >= sizeof(proc_lasat_ipbuf)-1)
209 len = sizeof(proc_lasat_ipbuf) - 1; 209 len = sizeof(proc_lasat_ipbuf) - 1;
210 if (copy_from_user(proc_lasat_ipbuf, buffer, len)) 210 if (copy_from_user(proc_lasat_ipbuf, buffer, len))
211 { 211 {
@@ -249,8 +249,8 @@ int proc_lasat_ip(ctl_table *table, int write, struct file *filp,
249} 249}
250#endif /* defined(CONFIG_INET) */ 250#endif /* defined(CONFIG_INET) */
251 251
252static int sysctl_lasat_eeprom_value(ctl_table *table, int *name, int nlen, 252static int sysctl_lasat_eeprom_value(ctl_table *table, int *name, int nlen,
253 void *oldval, size_t *oldlenp, 253 void *oldval, size_t *oldlenp,
254 void *newval, size_t newlen, 254 void *newval, size_t newlen,
255 void **context) 255 void **context)
256{ 256{
@@ -293,7 +293,7 @@ int proc_lasat_eeprom_value(ctl_table *table, int write, struct file *filp,
293 if (!strcmp(filp->f_dentry->d_name.name, "debugaccess")) 293 if (!strcmp(filp->f_dentry->d_name.name, "debugaccess"))
294 lasat_board_info.li_eeprom_info.debugaccess = lasat_board_info.li_debugaccess; 294 lasat_board_info.li_eeprom_info.debugaccess = lasat_board_info.li_debugaccess;
295 } 295 }
296 lasat_write_eeprom_info(); 296 lasat_write_eeprom_info();
297 up(&lasat_info_sem); 297 up(&lasat_info_sem);
298 return 0; 298 return 0;
299} 299}
@@ -316,8 +316,8 @@ static ctl_table lasat_table[] = {
316 0644, NULL, &proc_lasat_ip, &sysctl_lasat_intvec}, 316 0644, NULL, &proc_lasat_ip, &sysctl_lasat_intvec},
317 {LASAT_NETMASK, "netmask", &lasat_board_info.li_eeprom_info.netmask, sizeof(int), 317 {LASAT_NETMASK, "netmask", &lasat_board_info.li_eeprom_info.netmask, sizeof(int),
318 0644, NULL, &proc_lasat_ip, &sysctl_lasat_intvec}, 318 0644, NULL, &proc_lasat_ip, &sysctl_lasat_intvec},
319 {LASAT_BCAST, "bcastaddr", &lasat_bcastaddr, 319 {LASAT_BCAST, "bcastaddr", &lasat_bcastaddr,
320 sizeof(lasat_bcastaddr), 0600, NULL, 320 sizeof(lasat_bcastaddr), 0600, NULL,
321 &proc_dostring, &sysctl_string}, 321 &proc_dostring, &sysctl_string},
322#endif 322#endif
323 {LASAT_PASSWORD, "passwd_hash", &lasat_board_info.li_eeprom_info.passwd_hash, sizeof(lasat_board_info.li_eeprom_info.passwd_hash), 323 {LASAT_PASSWORD, "passwd_hash", &lasat_board_info.li_eeprom_info.passwd_hash, sizeof(lasat_board_info.li_eeprom_info.passwd_hash),