Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
a13b3df1
Commit
a13b3df1
authored
Aug 29, 2002
by
Anton Blanchard
Browse files
Options
Browse Files
Download
Plain Diff
Merge samba.org:/scratch/anton/linux-2.5
into samba.org:/scratch/anton/linux-2.5_work
parents
22113f35
22101408
Changes
28
Hide whitespace changes
Inline
Side-by-side
Showing
28 changed files
with
312 additions
and
181 deletions
+312
-181
Makefile
Makefile
+1
-1
arch/ppc/amiga/config.c
arch/ppc/amiga/config.c
+0
-4
arch/ppc/kernel/misc.S
arch/ppc/kernel/misc.S
+6
-0
arch/ppc/kernel/ppc_ksyms.c
arch/ppc/kernel/ppc_ksyms.c
+1
-1
arch/ppc/kernel/setup.c
arch/ppc/kernel/setup.c
+97
-0
arch/ppc/platforms/pmac_setup.c
arch/ppc/platforms/pmac_setup.c
+0
-14
drivers/char/Config.in
drivers/char/Config.in
+3
-0
drivers/char/Makefile
drivers/char/Makefile
+2
-22
drivers/char/console.c
drivers/char/console.c
+1
-7
drivers/char/keyboard.c
drivers/char/keyboard.c
+31
-15
drivers/input/evbug.c
drivers/input/evbug.c
+8
-0
drivers/input/evdev.c
drivers/input/evdev.c
+8
-0
drivers/input/input.c
drivers/input/input.c
+53
-85
drivers/input/joydev.c
drivers/input/joydev.c
+8
-0
drivers/input/joystick/iforce/iforce-usb.c
drivers/input/joystick/iforce/iforce-usb.c
+1
-1
drivers/input/keyboard/atkbd.c
drivers/input/keyboard/atkbd.c
+1
-1
drivers/input/mouse/psmouse.c
drivers/input/mouse/psmouse.c
+8
-8
drivers/input/mousedev.c
drivers/input/mousedev.c
+14
-6
drivers/input/tsdev.c
drivers/input/tsdev.c
+8
-0
drivers/usb/input/hid-core.c
drivers/usb/input/hid-core.c
+4
-4
include/asm-ppc/cache.h
include/asm-ppc/cache.h
+2
-1
include/asm-ppc/ide.h
include/asm-ppc/ide.h
+23
-2
include/asm-ppc/kmap_types.h
include/asm-ppc/kmap_types.h
+2
-0
include/asm-ppc/rtc.h
include/asm-ppc/rtc.h
+1
-1
include/asm-ppc/unistd.h
include/asm-ppc/unistd.h
+6
-0
include/linux/input.h
include/linux/input.h
+15
-6
mm/swap.c
mm/swap.c
+0
-1
mm/vmscan.c
mm/vmscan.c
+8
-1
No files found.
Makefile
View file @
a13b3df1
VERSION
=
2
PATCHLEVEL
=
5
SUBLEVEL
=
3
1
SUBLEVEL
=
3
2
EXTRAVERSION
=
# *DOCUMENTATION*
...
...
arch/ppc/amiga/config.c
View file @
a13b3df1
...
...
@@ -93,7 +93,6 @@ static void a3000_gettod (int *, int *, int *, int *, int *, int *);
static
void
a2000_gettod
(
int
*
,
int
*
,
int
*
,
int
*
,
int
*
,
int
*
);
static
int
amiga_hwclk
(
int
,
struct
hwclk_time
*
);
static
int
amiga_set_clock_mmss
(
unsigned
long
);
extern
void
amiga_mksound
(
unsigned
int
count
,
unsigned
int
ticks
);
#ifdef CONFIG_AMIGA_FLOPPY
extern
void
amiga_floppy_setup
(
char
*
,
int
*
);
#endif
...
...
@@ -115,8 +114,6 @@ static struct console amiga_console_driver = {
index:
-
1
,
};
extern
void
(
*
kd_mksound
)(
unsigned
int
,
unsigned
int
);
/*
* Motherboard Resources present in all Amiga models
...
...
@@ -432,7 +429,6 @@ void __init config_amiga(void)
#ifdef CONFIG_DUMMY_CONSOLE
conswitchp
=
&
dummy_con
;
#endif
kd_mksound
=
amiga_mksound
;
#ifdef CONFIG_HEARTBEAT
mach_heartbeat
=
amiga_heartbeat
;
#endif
...
...
arch/ppc/kernel/misc.S
View file @
a13b3df1
...
...
@@ -1298,6 +1298,12 @@ _GLOBAL(sys_call_table)
.
long
sys_sched_getaffinity
.
long
sys_security
.
long
sys_ni_syscall
/*
225
-
reserved
for
Tux
*/
.
long
sys_sendfile64
.
long
sys_io_setup
.
long
sys_io_destroy
.
long
sys_io_getevents
.
long
sys_io_submit
/*
230
*/
.
long
sys_io_cancel
.
rept
NR_syscalls
-(
.
-
sys_call_table
)/
4
.
long
sys_ni_syscall
...
...
arch/ppc/kernel/ppc_ksyms.c
View file @
a13b3df1
...
...
@@ -5,8 +5,8 @@
#include <linux/module.h>
#include <linux/threads.h>
#include <linux/smp.h>
#include <linux/elfcore.h>
#include <linux/sched.h>
#include <linux/elfcore.h>
#include <linux/string.h>
#include <linux/interrupt.h>
#include <linux/tty.h>
...
...
arch/ppc/kernel/setup.c
View file @
a13b3df1
...
...
@@ -659,3 +659,100 @@ void __init setup_arch(char **cmdline_p)
/* this is for modules since _machine can be a define -- Cort */
ppc_md
.
ppc_machine
=
_machine
;
}
#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
/* Convert the shorts/longs in hd_driveid from little to big endian;
* chars are endian independant, of course, but strings need to be flipped.
* (Despite what it says in drivers/block/ide.h, they come up as little
* endian...)
*
* Changes to linux/hdreg.h may require changes here. */
void
ide_fix_driveid
(
struct
hd_driveid
*
id
)
{
int
i
;
unsigned
short
*
stringcast
;
id
->
config
=
__le16_to_cpu
(
id
->
config
);
id
->
cyls
=
__le16_to_cpu
(
id
->
cyls
);
id
->
reserved2
=
__le16_to_cpu
(
id
->
reserved2
);
id
->
heads
=
__le16_to_cpu
(
id
->
heads
);
id
->
track_bytes
=
__le16_to_cpu
(
id
->
track_bytes
);
id
->
sector_bytes
=
__le16_to_cpu
(
id
->
sector_bytes
);
id
->
sectors
=
__le16_to_cpu
(
id
->
sectors
);
id
->
vendor0
=
__le16_to_cpu
(
id
->
vendor0
);
id
->
vendor1
=
__le16_to_cpu
(
id
->
vendor1
);
id
->
vendor2
=
__le16_to_cpu
(
id
->
vendor2
);
stringcast
=
(
unsigned
short
*
)
&
id
->
serial_no
[
0
];
for
(
i
=
0
;
i
<
(
20
/
2
);
i
++
)
stringcast
[
i
]
=
__le16_to_cpu
(
stringcast
[
i
]);
id
->
buf_type
=
__le16_to_cpu
(
id
->
buf_type
);
id
->
buf_size
=
__le16_to_cpu
(
id
->
buf_size
);
id
->
ecc_bytes
=
__le16_to_cpu
(
id
->
ecc_bytes
);
stringcast
=
(
unsigned
short
*
)
&
id
->
fw_rev
[
0
];
for
(
i
=
0
;
i
<
(
8
/
2
);
i
++
)
stringcast
[
i
]
=
__le16_to_cpu
(
stringcast
[
i
]);
stringcast
=
(
unsigned
short
*
)
&
id
->
model
[
0
];
for
(
i
=
0
;
i
<
(
40
/
2
);
i
++
)
stringcast
[
i
]
=
__le16_to_cpu
(
stringcast
[
i
]);
id
->
dword_io
=
__le16_to_cpu
(
id
->
dword_io
);
id
->
reserved50
=
__le16_to_cpu
(
id
->
reserved50
);
id
->
field_valid
=
__le16_to_cpu
(
id
->
field_valid
);
id
->
cur_cyls
=
__le16_to_cpu
(
id
->
cur_cyls
);
id
->
cur_heads
=
__le16_to_cpu
(
id
->
cur_heads
);
id
->
cur_sectors
=
__le16_to_cpu
(
id
->
cur_sectors
);
id
->
cur_capacity0
=
__le16_to_cpu
(
id
->
cur_capacity0
);
id
->
cur_capacity1
=
__le16_to_cpu
(
id
->
cur_capacity1
);
id
->
lba_capacity
=
__le32_to_cpu
(
id
->
lba_capacity
);
id
->
dma_1word
=
__le16_to_cpu
(
id
->
dma_1word
);
id
->
dma_mword
=
__le16_to_cpu
(
id
->
dma_mword
);
id
->
eide_pio_modes
=
__le16_to_cpu
(
id
->
eide_pio_modes
);
id
->
eide_dma_min
=
__le16_to_cpu
(
id
->
eide_dma_min
);
id
->
eide_dma_time
=
__le16_to_cpu
(
id
->
eide_dma_time
);
id
->
eide_pio
=
__le16_to_cpu
(
id
->
eide_pio
);
id
->
eide_pio_iordy
=
__le16_to_cpu
(
id
->
eide_pio_iordy
);
for
(
i
=
0
;
i
<
2
;
i
++
)
id
->
words69_70
[
i
]
=
__le16_to_cpu
(
id
->
words69_70
[
i
]);
for
(
i
=
0
;
i
<
4
;
i
++
)
id
->
words71_74
[
i
]
=
__le16_to_cpu
(
id
->
words71_74
[
i
]);
id
->
queue_depth
=
__le16_to_cpu
(
id
->
queue_depth
);
for
(
i
=
0
;
i
<
4
;
i
++
)
id
->
words76_79
[
i
]
=
__le16_to_cpu
(
id
->
words76_79
[
i
]);
id
->
major_rev_num
=
__le16_to_cpu
(
id
->
major_rev_num
);
id
->
minor_rev_num
=
__le16_to_cpu
(
id
->
minor_rev_num
);
id
->
command_set_1
=
__le16_to_cpu
(
id
->
command_set_1
);
id
->
command_set_2
=
__le16_to_cpu
(
id
->
command_set_2
);
id
->
cfsse
=
__le16_to_cpu
(
id
->
cfsse
);
id
->
cfs_enable_1
=
__le16_to_cpu
(
id
->
cfs_enable_1
);
id
->
cfs_enable_2
=
__le16_to_cpu
(
id
->
cfs_enable_2
);
id
->
csf_default
=
__le16_to_cpu
(
id
->
csf_default
);
id
->
dma_ultra
=
__le16_to_cpu
(
id
->
dma_ultra
);
id
->
word89
=
__le16_to_cpu
(
id
->
word89
);
id
->
word90
=
__le16_to_cpu
(
id
->
word90
);
id
->
CurAPMvalues
=
__le16_to_cpu
(
id
->
CurAPMvalues
);
id
->
word92
=
__le16_to_cpu
(
id
->
word92
);
id
->
hw_config
=
__le16_to_cpu
(
id
->
hw_config
);
id
->
acoustic
=
__le16_to_cpu
(
id
->
acoustic
);
for
(
i
=
0
;
i
<
5
;
i
++
)
id
->
words95_99
[
i
]
=
__le16_to_cpu
(
id
->
words95_99
[
i
]);
id
->
lba_capacity_2
=
__le64_to_cpu
(
id
->
lba_capacity_2
);
for
(
i
=
0
;
i
<
22
;
i
++
)
id
->
words104_125
[
i
]
=
__le16_to_cpu
(
id
->
words104_125
[
i
]);
id
->
last_lun
=
__le16_to_cpu
(
id
->
last_lun
);
id
->
word127
=
__le16_to_cpu
(
id
->
word127
);
id
->
dlf
=
__le16_to_cpu
(
id
->
dlf
);
id
->
csfo
=
__le16_to_cpu
(
id
->
csfo
);
for
(
i
=
0
;
i
<
26
;
i
++
)
id
->
words130_155
[
i
]
=
__le16_to_cpu
(
id
->
words130_155
[
i
]);
id
->
word156
=
__le16_to_cpu
(
id
->
word156
);
for
(
i
=
0
;
i
<
3
;
i
++
)
id
->
words157_159
[
i
]
=
__le16_to_cpu
(
id
->
words157_159
[
i
]);
id
->
cfa_power
=
__le16_to_cpu
(
id
->
cfa_power
);
for
(
i
=
0
;
i
<
14
;
i
++
)
id
->
words161_175
[
i
]
=
__le16_to_cpu
(
id
->
words161_175
[
i
]);
for
(
i
=
0
;
i
<
31
;
i
++
)
id
->
words176_205
[
i
]
=
__le16_to_cpu
(
id
->
words176_205
[
i
]);
for
(
i
=
0
;
i
<
48
;
i
++
)
id
->
words206_254
[
i
]
=
__le16_to_cpu
(
id
->
words206_254
[
i
]);
id
->
integrity_word
=
__le16_to_cpu
(
id
->
integrity_word
);
}
#endif
arch/ppc/platforms/pmac_setup.c
View file @
a13b3df1
...
...
@@ -229,17 +229,6 @@ pmac_show_cpuinfo(struct seq_file *m)
return
0
;
}
#ifdef CONFIG_VT
/*
* Dummy mksound function that does nothing.
* The real one is in the dmasound driver.
*/
static
void
__pmac
pmac_mksound
(
unsigned
int
hz
,
unsigned
int
ticks
)
{
}
#endif
/* CONFIG_VT */
static
volatile
u32
*
sysctrl_regs
;
void
__init
...
...
@@ -323,9 +312,6 @@ pmac_setup_arch(void)
#ifdef CONFIG_DUMMY_CONSOLE
conswitchp
=
&
dummy_con
;
#endif
#ifdef CONFIG_VT
kd_mksound
=
pmac_mksound
;
#endif
#ifdef CONFIG_BLK_DEV_INITRD
if
(
initrd_start
)
ROOT_DEV
=
Root_RAM0
;
...
...
drivers/char/Config.in
View file @
a13b3df1
...
...
@@ -8,6 +8,9 @@ bool 'Virtual terminal' CONFIG_VT
if [ "$CONFIG_VT" = "y" ]; then
bool ' Support for console on virtual terminal' CONFIG_VT_CONSOLE
fi
if [ "$CONFIG_VT" = "y" -a "$CONFIG_S390" != "y" -a "$CONFIG_UM" != "y" ]; then
define_bool CONFIG_HW_CONSOLE y
fi
bool 'Non-standard serial port support' CONFIG_SERIAL_NONSTANDARD
if [ "$CONFIG_SERIAL_NONSTANDARD" = "y" ]; then
tristate ' Computone IntelliPort Plus serial support' CONFIG_COMPUTONE
...
...
drivers/char/Makefile
View file @
a13b3df1
...
...
@@ -17,28 +17,8 @@ export-objs := busmouse.o console.o keyboard.o sysrq.o \
sonypi.o tty_io.o tty_ioctl.o generic_serial.o rtc.o
\
ip2main.o
ifneq
($(ARCH),s390)
ifneq
($(ARCH),s390x)
ifneq
($(ARCH),um)
KEYMAP
=
defkeymap.o
CONSOLE
=
console.o
endif
endif
endif
ifdef
CONFIG_Q40
SERIAL
=
serial.o
endif
ifeq
($(CONFIG_DECSTATION),y)
SERIAL
=
decserial.o
endif
obj-$(CONFIG_VT)
+=
vt.o vc_screen.o consolemap.o consolemap_deftbl.o
$(CONSOLE)
selection.o
#obj-$(CONFIG_SERIAL) += $(SERIAL) # Fix for decserial.o
obj-$(CONFIG_VT)
+=
keyboard.o
$(KEYMAP)
obj-$(CONFIG_VT)
+=
vt.o vc_screen.o consolemap.o consolemap_deftbl.o selection.o keyboard.o
obj-$(CONFIG_HW_CONSOLE)
+=
console.o defkeymap.o
obj-$(CONFIG_MAGIC_SYSRQ)
+=
sysrq.o
obj-$(CONFIG_ATARI_DSP56K)
+=
dsp56k.o
obj-$(CONFIG_ROCKETPORT)
+=
rocket.o
...
...
drivers/char/console.c
View file @
a13b3df1
...
...
@@ -128,10 +128,6 @@ const struct consw *conswitchp;
extern
void
vcs_make_devfs
(
unsigned
int
index
,
int
unregister
);
extern
void
console_map_init
(
void
);
#ifndef MIN
#define MIN(a,b) ((a) < (b) ? (a) : (b))
#endif
static
struct
tty_struct
*
console_table
[
MAX_NR_CONSOLES
];
static
struct
termios
*
console_termios
[
MAX_NR_CONSOLES
];
static
struct
termios
*
console_termios_locked
[
MAX_NR_CONSOLES
];
...
...
@@ -748,7 +744,7 @@ int vc_resize(unsigned int lines, unsigned int cols,
video_size_row
=
sr
;
screenbuf_size
=
ss
;
rlth
=
MIN
(
osr
,
sr
);
rlth
=
min
(
osr
,
sr
);
rrem
=
sr
-
rlth
;
ol
=
origin
;
nl
=
(
long
)
newscreens
[
currcons
];
...
...
@@ -3028,9 +3024,7 @@ EXPORT_SYMBOL(video_scan_lines);
EXPORT_SYMBOL
(
vc_resize
);
EXPORT_SYMBOL
(
fg_console
);
EXPORT_SYMBOL
(
console_blank_hook
);
#ifdef CONFIG_VT
EXPORT_SYMBOL
(
vt_cons
);
#endif
#ifndef VT_SINGLE_DRIVER
EXPORT_SYMBOL
(
take_over_console
);
EXPORT_SYMBOL
(
give_up_console
);
...
...
drivers/char/keyboard.c
View file @
a13b3df1
...
...
@@ -161,11 +161,16 @@ static int sysrq_alt;
*/
int
getkeycode
(
unsigned
int
scancode
)
{
struct
input_handle
*
handl
e
;
struct
list_head
*
nod
e
;
struct
input_dev
*
dev
=
NULL
;
for
(
handle
=
kbd_handler
.
handle
;
handle
;
handle
=
handle
->
hnext
)
if
(
handle
->
dev
->
keycodesize
)
{
dev
=
handle
->
dev
;
break
;
}
list_for_each
(
node
,
&
kbd_handler
.
h_list
)
{
struct
input_handle
*
handle
=
to_handle_h
(
node
);
if
(
handle
->
dev
->
keycodesize
)
{
dev
=
handle
->
dev
;
break
;
}
}
if
(
!
dev
)
return
-
ENODEV
;
...
...
@@ -178,12 +183,17 @@ int getkeycode(unsigned int scancode)
int
setkeycode
(
unsigned
int
scancode
,
unsigned
int
keycode
)
{
struct
input_handle
*
handl
e
;
struct
list_head
*
nod
e
;
struct
input_dev
*
dev
=
NULL
;
int
i
,
oldkey
;
for
(
handle
=
kbd_handler
.
handle
;
handle
;
handle
=
handle
->
hnext
)
if
(
handle
->
dev
->
keycodesize
)
{
dev
=
handle
->
dev
;
break
;
}
list_for_each
(
node
,
&
kbd_handler
.
h_list
)
{
struct
input_handle
*
handle
=
to_handle_h
(
node
);
if
(
handle
->
dev
->
keycodesize
)
{
dev
=
handle
->
dev
;
break
;
}
}
if
(
!
dev
)
return
-
ENODEV
;
...
...
@@ -209,27 +219,30 @@ int setkeycode(unsigned int scancode, unsigned int keycode)
*/
static
void
kd_nosound
(
unsigned
long
ignored
)
{
struct
input_handle
*
handl
e
;
struct
list_head
*
nod
e
;
for
(
handle
=
kbd_handler
.
handle
;
handle
;
handle
=
handle
->
hnext
)
list_for_each
(
node
,
&
kbd_handler
.
h_list
)
{
struct
input_handle
*
handle
=
to_handle_h
(
node
);
if
(
test_bit
(
EV_SND
,
handle
->
dev
->
evbit
))
{
if
(
test_bit
(
SND_TONE
,
handle
->
dev
->
sndbit
))
input_event
(
handle
->
dev
,
EV_SND
,
SND_TONE
,
0
);
if
(
test_bit
(
SND_BELL
,
handle
->
dev
->
sndbit
))
input_event
(
handle
->
dev
,
EV_SND
,
SND_BELL
,
0
);
}
}
}
static
struct
timer_list
kd_mksound_timer
=
{
function
:
kd_nosound
};
void
kd_mksound
(
unsigned
int
hz
,
unsigned
int
ticks
)
{
struct
input_handle
*
handl
e
;
struct
list_head
*
nod
e
;
del_timer
(
&
kd_mksound_timer
);
if
(
hz
)
{
for
(
handle
=
kbd_handler
.
handle
;
handle
;
handle
=
handle
->
hnext
)
list_for_each
(
node
,
&
kbd_handler
.
h_list
)
{
struct
input_handle
*
handle
=
to_handle_h
(
node
);
if
(
test_bit
(
EV_SND
,
handle
->
dev
->
evbit
))
{
if
(
test_bit
(
SND_TONE
,
handle
->
dev
->
sndbit
))
{
input_event
(
handle
->
dev
,
EV_SND
,
SND_TONE
,
hz
);
...
...
@@ -240,6 +253,7 @@ void kd_mksound(unsigned int hz, unsigned int ticks)
break
;
}
}
}
if
(
ticks
)
mod_timer
(
&
kd_mksound_timer
,
jiffies
+
ticks
);
}
else
...
...
@@ -251,12 +265,13 @@ void kd_mksound(unsigned int hz, unsigned int ticks)
*/
int
kbd_rate
(
struct
kbd_repeat
*
rep
)
{
struct
input_handle
*
handl
e
;
struct
list_head
*
nod
e
;
if
(
rep
->
rate
<
0
||
rep
->
delay
<
0
)
return
-
EINVAL
;
for
(
handle
=
kbd_handler
.
handle
;
handle
;
handle
=
handle
->
hnext
)
list_for_each
(
node
,
&
kbd_handler
.
h_list
)
{
struct
input_handle
*
handle
=
to_handle_h
(
node
);
if
(
test_bit
(
EV_REP
,
handle
->
dev
->
evbit
))
{
if
(
rep
->
rate
>
HZ
)
rep
->
rate
=
HZ
;
handle
->
dev
->
rep
[
REP_PERIOD
]
=
rep
->
rate
?
(
HZ
/
rep
->
rate
)
:
0
;
...
...
@@ -264,7 +279,7 @@ int kbd_rate(struct kbd_repeat *rep)
if
(
handle
->
dev
->
rep
[
REP_DELAY
]
<
handle
->
dev
->
rep
[
REP_PERIOD
])
handle
->
dev
->
rep
[
REP_DELAY
]
=
handle
->
dev
->
rep
[
REP_PERIOD
];
}
}
return
0
;
}
...
...
@@ -874,11 +889,12 @@ static inline unsigned char getleds(void)
static
void
kbd_bh
(
unsigned
long
dummy
)
{
struct
input_handle
*
handle
;
struct
list_head
*
node
;
unsigned
char
leds
=
getleds
();
if
(
leds
!=
ledstate
)
{
for
(
handle
=
kbd_handler
.
handle
;
handle
;
handle
=
handle
->
hnext
)
{
list_for_each
(
node
,
&
kbd_handler
.
h_list
)
{
struct
input_handle
*
handle
=
to_handle_h
(
node
);
input_event
(
handle
->
dev
,
EV_LED
,
LED_SCROLLL
,
!!
(
leds
&
0x01
));
input_event
(
handle
->
dev
,
EV_LED
,
LED_NUML
,
!!
(
leds
&
0x02
));
input_event
(
handle
->
dev
,
EV_LED
,
LED_CAPSL
,
!!
(
leds
&
0x04
));
...
...
drivers/input/evbug.c
View file @
a13b3df1
...
...
@@ -32,6 +32,7 @@
#include <linux/module.h>
#include <linux/input.h>
#include <linux/init.h>
#include <linux/device.h>
MODULE_AUTHOR
(
"Vojtech Pavlik <vojtech@ucw.cz>"
);
MODULE_DESCRIPTION
(
"Input driver event debug module"
);
...
...
@@ -87,8 +88,14 @@ static struct input_handler evbug_handler = {
.
id_table
=
evbug_ids
,
};
static
struct
device_interface
evbug_intf
=
{
.
name
=
"debug"
,
.
devclass
=
&
input_devclass
,
};
int
__init
evbug_init
(
void
)
{
interface_register
(
&
evbug_intf
);
input_register_handler
(
&
evbug_handler
);
return
0
;
}
...
...
@@ -96,6 +103,7 @@ int __init evbug_init(void)
void
__exit
evbug_exit
(
void
)
{
input_unregister_handler
(
&
evbug_handler
);
interface_register
(
&
evbug_intf
);
}
module_init
(
evbug_init
);
...
...
drivers/input/evdev.c
View file @
a13b3df1
...
...
@@ -36,6 +36,7 @@
#include <linux/init.h>
#include <linux/input.h>
#include <linux/smp_lock.h>
#include <linux/device.h>
struct
evdev
{
int
exist
;
...
...
@@ -484,8 +485,14 @@ static struct input_handler evdev_handler = {
.
id_table
=
evdev_ids
,
};
static
struct
device_interface
evdev_intf
=
{
.
name
=
"event"
,
.
devclass
=
&
input_devclass
,
};
static
int
__init
evdev_init
(
void
)
{
interface_register
(
&
evdev_intf
);
input_register_handler
(
&
evdev_handler
);
return
0
;
}
...
...
@@ -493,6 +500,7 @@ static int __init evdev_init(void)
static
void
__exit
evdev_exit
(
void
)
{
input_unregister_handler
(
&
evdev_handler
);
interface_register
(
&
evdev_intf
);
}
module_init
(
evdev_init
);
...
...
drivers/input/input.c
View file @
a13b3df1
...
...
@@ -37,6 +37,7 @@
#include <linux/kmod.h>
#include <linux/interrupt.h>
#include <linux/poll.h>
#include <linux/device.h>
MODULE_AUTHOR
(
"Vojtech Pavlik <vojtech@ucw.cz>"
);
MODULE_DESCRIPTION
(
"Input core"
);
...
...
@@ -57,8 +58,9 @@ EXPORT_SYMBOL(input_event);
#define INPUT_MAJOR 13
#define INPUT_DEVICES 256
static
struct
input_dev
*
input_dev
;
static
struct
input_handler
*
input_handler
;
static
LIST_HEAD
(
input_dev_list
);
static
LIST_HEAD
(
input_handler_list
);
static
struct
input_handler
*
input_table
[
8
];
static
devfs_handle_t
input_devfs_handle
;
...
...
@@ -68,9 +70,10 @@ DECLARE_WAIT_QUEUE_HEAD(input_devices_poll_wait);
static
int
input_devices_state
;
#endif
void
input_event
(
struct
input_dev
*
dev
,
unsigned
int
type
,
unsigned
int
code
,
int
value
)
{
struct
input_handle
*
handle
=
dev
->
handl
e
;
struct
list_head
*
nod
e
;
if
(
dev
->
pm_dev
)
pm_access
(
dev
->
pm_dev
);
...
...
@@ -189,10 +192,10 @@ void input_event(struct input_dev *dev, unsigned int type, unsigned int code, in
if
(
type
!=
EV_SYN
)
dev
->
sync
=
0
;
while
(
handle
)
{
list_for_each
(
node
,
&
dev
->
h_list
)
{
struct
input_handle
*
handle
=
to_handle
(
node
);
if
(
handle
->
open
)
handle
->
handler
->
event
(
handle
,
type
,
code
,
value
);
handle
=
handle
->
dnext
;
}
}
...
...
@@ -246,41 +249,8 @@ void input_close_device(struct input_handle *handle)
static
void
input_link_handle
(
struct
input_handle
*
handle
)
{
handle
->
dnext
=
handle
->
dev
->
handle
;
handle
->
hnext
=
handle
->
handler
->
handle
;
handle
->
dev
->
handle
=
handle
;
handle
->
handler
->
handle
=
handle
;
}
/**
* input_find_and_remove - Find and remove node
*
* @type: data type
* @initval: initial value
* @targ: node to find
* @next: next node in the list
*
* Searches the linked list for the target node @targ. If the node
* is found, it is removed from the list.
*
* If the node is not found, the end of the list will be hit,
* indicating that it wasn't in the list to begin with.
*
* Returns nothing.
*/
#define input_find_and_remove(type, initval, targ, next) \
do { \
type **ptr; \
for (ptr = &initval; *ptr; ptr = &((*ptr)->next)) \
if (*ptr == targ) break; \
if (*ptr) *ptr = (*ptr)->next; \
} while (0)
static
void
input_unlink_handle
(
struct
input_handle
*
handle
)
{
input_find_and_remove
(
struct
input_handle
,
handle
->
dev
->
handle
,
handle
,
dnext
);
input_find_and_remove
(
struct
input_handle
,
handle
->
handler
->
handle
,
handle
,
hnext
);
list_add_tail
(
&
handle
->
d_node
,
&
handle
->
dev
->
h_list
);
list_add_tail
(
&
handle
->
h_node
,
&
handle
->
handler
->
h_list
);
}
#define MATCH_BIT(bit, max) \
...
...
@@ -441,7 +411,7 @@ static void input_call_hotplug(char *verb, struct input_dev *dev)
void
input_register_device
(
struct
input_dev
*
dev
)
{
struct
input_handler
*
handler
=
input_handler
;
struct
list_head
*
node
;
struct
input_handle
*
handle
;
struct
input_device_id
*
id
;
...
...
@@ -464,19 +434,17 @@ void input_register_device(struct input_dev *dev)
/*
* Add the device.
*/
dev
->
next
=
input_dev
;
input_dev
=
dev
;
INIT_LIST_HEAD
(
&
dev
->
h_list
);
list_add_tail
(
&
dev
->
node
,
&
input_dev_list
);
/*
* Notify handlers.
*/
while
(
handler
)
{
list_for_each
(
node
,
&
input_handler_list
)
{
struct
input_handler
*
handler
=
to_handler
(
node
);
if
((
id
=
input_match_device
(
handler
->
id_table
,
dev
)))
if
((
handle
=
handler
->
connect
(
handler
,
dev
,
id
)))
input_link_handle
(
handle
);
handler
=
handler
->
next
;
}
/*
...
...
@@ -499,8 +467,7 @@ void input_register_device(struct input_dev *dev)
void
input_unregister_device
(
struct
input_dev
*
dev
)
{
struct
input_handle
*
handle
=
dev
->
handle
;
struct
input_handle
*
dnext
;
struct
list_head
*
node
,
*
next
;
if
(
!
dev
)
return
;
...
...
@@ -520,11 +487,11 @@ void input_unregister_device(struct input_dev *dev)
* Notify handlers.
*/
while
(
handle
)
{
dnext
=
handle
->
dnext
;
input_unlink_handle
(
handle
);
list_for_each_safe
(
node
,
next
,
&
dev
->
h_list
)
{
struct
input_handle
*
handle
=
to_handle
(
node
);
list_del_init
(
&
handle
->
d_node
);
list_del_init
(
&
handle
->
h_node
);
handle
->
handler
->
disconnect
(
handle
);
handle
=
dnext
;
}
/*
...
...
@@ -538,7 +505,7 @@ void input_unregister_device(struct input_dev *dev)
/*
* Remove the device.
*/
input_find_and_remove
(
struct
input_dev
,
input_dev
,
dev
,
next
);
list_del_init
(
&
dev
->
node
);
/*
* Notify /proc.
...
...
@@ -552,12 +519,13 @@ void input_unregister_device(struct input_dev *dev)
void
input_register_handler
(
struct
input_handler
*
handler
)
{
struct
input_dev
*
dev
=
input_dev
;
struct
list_head
*
node
;
struct
input_handle
*
handle
;
struct
input_device_id
*
id
;
if
(
!
handler
)
return
;
INIT_LIST_HEAD
(
&
handler
->
h_list
);
/*
* Add minors if needed.
*/
...
...
@@ -568,19 +536,17 @@ void input_register_handler(struct input_handler *handler)
/*
* Add the handler.
*/
handler
->
next
=
input_handler
;
input_handler
=
handler
;
list_add_tail
(
&
handler
->
node
,
&
input_handler_list
);
/*
* Notify it about all existing devices.
*/
while
(
dev
)
{
list_for_each
(
node
,
&
input_dev_list
)
{
struct
input_dev
*
dev
=
to_dev
(
node
);
if
((
id
=
input_match_device
(
handler
->
id_table
,
dev
)))
if
((
handle
=
handler
->
connect
(
handler
,
dev
,
id
)))
input_link_handle
(
handle
);
dev
=
dev
->
next
;
}
/*
...
...
@@ -595,25 +561,23 @@ void input_register_handler(struct input_handler *handler)
void
input_unregister_handler
(
struct
input_handler
*
handler
)
{
struct
input_handle
*
handle
=
handler
->
handle
;
struct
input_handle
*
hnext
;
struct
list_head
*
node
,
*
next
;
/*
* Tell the handler to disconnect from all devices it keeps open.
*/
while
(
handle
)
{
hnext
=
handle
->
hnext
;
input_unlink_handle
(
handl
e
);
list_for_each_safe
(
node
,
next
,
&
handler
->
h_list
)
{
struct
input_handle
*
handle
=
to_handle_h
(
node
);
list_del_init
(
&
handle
->
h_node
)
;
list_del_init
(
&
handle
->
d_nod
e
);
handler
->
disconnect
(
handle
);
handle
=
hnext
;
}
/*
* Remove it.
*/
input_find_and_remove
(
struct
input_handler
,
input_handler
,
handler
,
next
);
list_del_init
(
&
handler
->
node
);
/*
* Remove minors.
...
...
@@ -714,13 +678,14 @@ static unsigned int input_devices_poll(struct file *file, poll_table *wait)
static
int
input_devices_read
(
char
*
buf
,
char
**
start
,
off_t
pos
,
int
count
,
int
*
eof
,
void
*
data
)
{
struct
input_dev
*
dev
=
input_dev
;
struct
input_handle
*
handle
;
struct
list_head
*
node
;
off_t
at
=
0
;
int
i
,
len
,
cnt
=
0
;
while
(
dev
)
{
list_for_each
(
node
,
&
input_dev_list
)
{
struct
input_dev
*
dev
=
to_dev
(
node
);
struct
list_head
*
hnode
;
len
=
sprintf
(
buf
,
"I: Bus=%04x Vendor=%04x Product=%04x Version=%04x
\n
"
,
dev
->
id
.
bustype
,
dev
->
id
.
vendor
,
dev
->
id
.
product
,
dev
->
id
.
version
);
...
...
@@ -729,11 +694,9 @@ static int input_devices_read(char *buf, char **start, off_t pos, int count, int
len
+=
sprintf
(
buf
+
len
,
"P: Phys=%s
\n
"
,
dev
->
phys
?
dev
->
phys
:
""
);
len
+=
sprintf
(
buf
+
len
,
"D: Drivers="
);
handle
=
dev
->
handle
;
while
(
handle
)
{
list_for_each
(
hnode
,
&
dev
->
h_list
)
{
struct
input_handle
*
handle
=
to_handle
(
hnode
);
len
+=
sprintf
(
buf
+
len
,
"%s "
,
handle
->
name
);
handle
=
handle
->
dnext
;
}
len
+=
sprintf
(
buf
+
len
,
"
\n
"
);
...
...
@@ -760,24 +723,24 @@ static int input_devices_read(char *buf, char **start, off_t pos, int count, int
if
(
cnt
>=
count
)
break
;
}
dev
=
dev
->
next
;
}
if
(
!
dev
)
*
eof
=
1
;
if
(
node
==
&
input_dev_list
)
*
eof
=
1
;
return
(
count
>
cnt
)
?
cnt
:
count
;
}
static
int
input_handlers_read
(
char
*
buf
,
char
**
start
,
off_t
pos
,
int
count
,
int
*
eof
,
void
*
data
)
{
struct
input_handler
*
handler
=
input_handler
;
struct
list_head
*
node
;
off_t
at
=
0
;
int
len
=
0
,
cnt
=
0
;
int
i
=
0
;
while
(
handler
)
{
list_for_each
(
node
,
&
input_handler_list
)
{
struct
input_handler
*
handler
=
to_handler
(
node
);
if
(
handler
->
fops
)
len
=
sprintf
(
buf
,
"N: Number=%d Name=%s Minor=%d
\n
"
,
...
...
@@ -797,21 +760,25 @@ static int input_handlers_read(char *buf, char **start, off_t pos, int count, in
if
(
cnt
>=
count
)
break
;
}
handler
=
handler
->
next
;
}
if
(
!
handler
)
*
eof
=
1
;
if
(
node
==
&
input_handler_list
)
*
eof
=
1
;
return
(
count
>
cnt
)
?
cnt
:
count
;
}
#endif
struct
device_class
input_devclass
=
{
.
name
=
"input"
,
};
static
int
__init
input_init
(
void
)
{
struct
proc_dir_entry
*
entry
;
devclass_register
(
&
input_devclass
);
#ifdef CONFIG_PROC_FS
proc_bus_input_dir
=
proc_mkdir
(
"input"
,
proc_bus
);
proc_bus_input_dir
->
owner
=
THIS_MODULE
;
...
...
@@ -841,6 +808,7 @@ static void __exit input_exit(void)
devfs_unregister
(
input_devfs_handle
);
if
(
unregister_chrdev
(
INPUT_MAJOR
,
"input"
))
printk
(
KERN_ERR
"input: can't unregister char major %d"
,
INPUT_MAJOR
);
devclass_unregister
(
&
input_devclass
);
}
module_init
(
input_init
);
...
...
drivers/input/joydev.c
View file @
a13b3df1
...
...
@@ -42,6 +42,7 @@
#include <linux/poll.h>
#include <linux/init.h>
#include <linux/smp_lock.h>
#include <linux/device.h>
MODULE_AUTHOR
(
"Vojtech Pavlik <vojtech@ucw.cz>"
);
MODULE_DESCRIPTION
(
"Joystick device interfaces"
);
...
...
@@ -534,8 +535,14 @@ static struct input_handler joydev_handler = {
.
id_table
=
joydev_ids
,
};
static
struct
device_interface
joydev_intf
=
{
.
name
=
"joystick"
,
.
devclass
=
&
input_devclass
,
};
static
int
__init
joydev_init
(
void
)
{
interface_register
(
&
joydev_intf
);
input_register_handler
(
&
joydev_handler
);
return
0
;
}
...
...
@@ -543,6 +550,7 @@ static int __init joydev_init(void)
static
void
__exit
joydev_exit
(
void
)
{
input_unregister_handler
(
&
joydev_handler
);
interface_unregister
(
&
joydev_intf
);
}
module_init
(
joydev_init
);
...
...
drivers/input/joystick/iforce/iforce-usb.c
View file @
a13b3df1
...
...
@@ -179,7 +179,7 @@ void iforce_usb_delete(struct iforce* iforce)
static
void
iforce_usb_disconnect
(
struct
usb_device
*
dev
,
void
*
ptr
)
{
struct
iforce
*
iforce
=
ptr
;
int
open
=
iforce
->
dev
.
handle
->
open
;
int
open
=
0
;
/* FIXME! iforce->dev.handle->open; */
iforce
->
usbdev
=
NULL
;
input_unregister_device
(
&
iforce
->
dev
);
...
...
drivers/input/keyboard/atkbd.c
View file @
a13b3df1
...
...
@@ -366,7 +366,7 @@ static int atkbd_probe(struct atkbd *atkbd)
*/
if
(
atkbd_command
(
atkbd
,
NULL
,
ATKBD_CMD_RESET_DIS
))
return
-
1
;
printk
(
KERN_WARNING
"atkbd.c: keyboard reset failed
\n
"
)
;
/*
* Next, we check if it's a keyboard. It should send 0xab83
...
...
drivers/input/mouse/psmouse.c
View file @
a13b3df1
...
...
@@ -62,6 +62,7 @@ struct psmouse {
unsigned
char
cmdcnt
;
unsigned
char
pktcnt
;
unsigned
char
type
;
unsigned
char
model
;
unsigned
long
last
;
char
acking
;
char
ack
;
...
...
@@ -312,6 +313,7 @@ static int psmouse_extensions(struct psmouse *psmouse)
param
[
0
]
=
0
;
psmouse
->
vendor
=
"Generic"
;
psmouse
->
name
=
"Mouse"
;
psmouse
->
model
=
2
;
/*
* Try Genius NetMouse magic init.
...
...
@@ -353,11 +355,9 @@ static int psmouse_extensions(struct psmouse *psmouse)
static
int
logitech_wheel
[]
=
{
75
,
76
,
80
,
81
,
83
,
88
,
-
1
};
static
int
logitech_ps2pp
[]
=
{
12
,
13
,
40
,
41
,
42
,
43
,
50
,
51
,
52
,
53
,
73
,
75
,
76
,
80
,
81
,
83
,
88
,
96
,
97
,
-
1
};
int
devicetype
=
((
param
[
0
]
>>
4
)
&
0x07
)
|
((
param
[
0
]
<<
3
)
&
0x78
);
psmouse
->
vendor
=
"Logitech"
;
psmouse
->
name
=
"Mouse"
;
psmouse
->
model
=
((
param
[
0
]
>>
4
)
&
0x07
)
|
((
param
[
0
]
<<
3
)
&
0x78
);
if
(
param
[
1
]
<
3
)
clear_bit
(
BTN_MIDDLE
,
psmouse
->
dev
.
keybit
);
...
...
@@ -367,21 +367,21 @@ static int psmouse_extensions(struct psmouse *psmouse)
psmouse
->
type
=
PSMOUSE_PS2
;
for
(
i
=
0
;
logitech_ps2pp
[
i
]
!=
-
1
;
i
++
)
if
(
logitech_ps2pp
[
i
]
==
devicetype
)
psmouse
->
type
=
PSMOUSE_PS2PP
;
if
(
logitech_ps2pp
[
i
]
==
psmouse
->
model
)
psmouse
->
type
=
PSMOUSE_PS2PP
;
if
(
psmouse
->
type
!=
PSMOUSE_PS2PP
)
return
PSMOUSE_PS2
;
for
(
i
=
0
;
logitech_4btn
[
i
]
!=
-
1
;
i
++
)
if
(
logitech_4btn
[
i
]
==
devicetype
)
set_bit
(
BTN_SIDE
,
psmouse
->
dev
.
keybit
);
if
(
logitech_4btn
[
i
]
==
psmouse
->
model
)
set_bit
(
BTN_SIDE
,
psmouse
->
dev
.
keybit
);
for
(
i
=
0
;
logitech_wheel
[
i
]
!=
-
1
;
i
++
)
if
(
logitech_wheel
[
i
]
==
devicetype
)
set_bit
(
REL_WHEEL
,
psmouse
->
dev
.
relbit
);
if
(
logitech_wheel
[
i
]
==
psmouse
->
model
)
set_bit
(
REL_WHEEL
,
psmouse
->
dev
.
relbit
);
/*
* Do Logitech PS2++ / PS2T++ magic init.
*/
if
(
devicetype
==
97
)
{
/* TouchPad 3 */
if
(
psmouse
->
model
==
97
)
{
/* TouchPad 3 */
set_bit
(
REL_WHEEL
,
psmouse
->
dev
.
relbit
);
set_bit
(
REL_HWHEEL
,
psmouse
->
dev
.
relbit
);
...
...
@@ -603,7 +603,7 @@ static void psmouse_connect(struct serio *serio, struct serio_dev *dev)
psmouse
->
dev
.
phys
=
psmouse
->
phys
;
psmouse
->
dev
.
id
.
bustype
=
BUS_I8042
;
psmouse
->
dev
.
id
.
vendor
=
psmouse
->
type
;
psmouse
->
dev
.
id
.
product
=
0x0002
;
psmouse
->
dev
.
id
.
product
=
psmouse
->
model
;
psmouse
->
dev
.
id
.
version
=
0x0100
;
input_register_device
(
&
psmouse
->
dev
);
...
...
drivers/input/mousedev.c
View file @
a13b3df1
...
...
@@ -39,6 +39,7 @@
#include <linux/smp_lock.h>
#include <linux/random.h>
#include <linux/major.h>
#include <linux/device.h>
#ifdef CONFIG_INPUT_MOUSEDEV_PSAUX
#include <linux/miscdevice.h>
#endif
...
...
@@ -199,8 +200,9 @@ static int mousedev_release(struct inode * inode, struct file * file)
if
(
!--
list
->
mousedev
->
open
)
{
if
(
list
->
mousedev
->
minor
==
MOUSEDEV_MIX
)
{
struct
input_handle
*
handle
=
mousedev_handler
.
handle
;
while
(
handle
)
{
struct
list_head
*
node
;
list_for_each
(
node
,
&
mousedev_handler
.
h_list
)
{
struct
input_handle
*
handle
=
to_handle_h
(
node
);
struct
mousedev
*
mousedev
=
handle
->
private
;
if
(
!
mousedev
->
open
)
{
if
(
mousedev
->
exist
)
{
...
...
@@ -211,7 +213,6 @@ static int mousedev_release(struct inode * inode, struct file * file)
kfree
(
mousedev
);
}
}
handle
=
handle
->
hnext
;
}
}
else
{
if
(
!
mousedev_mix
.
open
)
{
...
...
@@ -257,13 +258,13 @@ static int mousedev_open(struct inode * inode, struct file * file)
if
(
!
list
->
mousedev
->
open
++
)
{
if
(
list
->
mousedev
->
minor
==
MOUSEDEV_MIX
)
{
struct
input_handle
*
handle
=
mousedev_handler
.
handle
;
while
(
handle
)
{
struct
list_head
*
node
;
list_for_each
(
node
,
&
mousedev_handler
.
h_list
)
{
struct
input_handle
*
handle
=
to_handle_h
(
node
);
struct
mousedev
*
mousedev
=
handle
->
private
;
if
(
!
mousedev
->
open
)
if
(
mousedev
->
exist
)
input_open_device
(
handle
);
handle
=
handle
->
hnext
;
}
}
else
{
if
(
!
mousedev_mix
.
open
)
...
...
@@ -516,8 +517,14 @@ static struct miscdevice psaux_mouse = {
};
#endif
static
struct
device_interface
mousedev_intf
=
{
.
name
=
"mouse"
,
.
devclass
=
&
input_devclass
,
};
static
int
__init
mousedev_init
(
void
)
{
interface_register
(
&
mousedev_intf
);
input_register_handler
(
&
mousedev_handler
);
memset
(
&
mousedev_mix
,
0
,
sizeof
(
struct
mousedev
));
...
...
@@ -542,6 +549,7 @@ static void __exit mousedev_exit(void)
#endif
input_unregister_minor
(
mousedev_mix
.
devfs
);
input_unregister_handler
(
&
mousedev_handler
);
interface_unregister
(
&
mousedev_intf
);
}
module_init
(
mousedev_init
);
...
...
drivers/input/tsdev.c
View file @
a13b3df1
...
...
@@ -40,6 +40,7 @@
#include <linux/smp_lock.h>
#include <linux/random.h>
#include <linux/time.h>
#include <linux/device.h>
#ifndef CONFIG_INPUT_TSDEV_SCREEN_X
#define CONFIG_INPUT_TSDEV_SCREEN_X 240
...
...
@@ -420,8 +421,14 @@ static struct input_handler tsdev_handler = {
.
id_table
=
tsdev_ids
,
};
static
struct
device_interface
tsdev_intf
=
{
.
name
=
"touchscreen"
,
.
devclass
=
&
input_devclass
,
};
static
int
__init
tsdev_init
(
void
)
{
interface_register
(
&
tsdev_intf
);
input_register_handler
(
&
tsdev_handler
);
printk
(
KERN_INFO
"ts: Compaq touchscreen protocol output
\n
"
);
return
0
;
...
...
@@ -430,6 +437,7 @@ static int __init tsdev_init(void)
static
void
__exit
tsdev_exit
(
void
)
{
input_unregister_handler
(
&
tsdev_handler
);
interface_unregister
(
&
tsdev_intf
);
}
module_init
(
tsdev_init
);
...
...
drivers/usb/input/hid-core.c
View file @
a13b3df1
...
...
@@ -879,7 +879,7 @@ static int hid_input_report(int type, struct urb *urb)
{
int
i
;
printk
(
KERN_DEBUG
__FILE__
": report %d (size %u) = "
,
n
,
len
);
for
(
i
=
0
;
i
<
n
;
i
++
)
for
(
i
=
0
;
i
<
le
n
;
i
++
)
printk
(
" %02x"
,
data
[
i
]);
printk
(
"
\n
"
);
}
...
...
@@ -1073,7 +1073,7 @@ static int hid_submit_ctrl(struct hid_device *hid)
hid
->
cr
.
bRequestType
=
USB_TYPE_CLASS
|
USB_RECIP_INTERFACE
|
dir
;
hid
->
cr
.
bRequest
=
(
dir
==
USB_DIR_OUT
)
?
HID_REQ_SET_REPORT
:
HID_REQ_GET_REPORT
;
hid
->
cr
.
wValue
=
((
report
->
type
+
1
)
<<
8
)
|
report
->
id
;
hid
->
cr
.
wValue
=
cpu_to_le16
(((
report
->
type
+
1
)
<<
8
)
|
report
->
id
)
;
hid
->
cr
.
wIndex
=
cpu_to_le16
(
hid
->
ifnum
);
hid
->
cr
.
wLength
=
cpu_to_le16
(
hid
->
urbctrl
->
transfer_buffer_length
);
...
...
@@ -1384,7 +1384,7 @@ static struct hid_device *usb_hid_configure(struct usb_device *dev, int ifnum)
#ifdef DEBUG_DATA
printk
(
KERN_DEBUG
__FILE__
": report descriptor (size %u, read %d) = "
,
rsize
,
n
);
for
(
n
=
0
;
n
<
rsize
;
n
++
)
printk
(
" %02x"
,
(
unsigned
)
rdesc
[
n
]);
printk
(
" %02x"
,
(
unsigned
char
)
rdesc
[
n
]);
printk
(
"
\n
"
);
#endif
...
...
@@ -1432,7 +1432,7 @@ static struct hid_device *usb_hid_configure(struct usb_device *dev, int ifnum)
hid
->
outlock
=
SPIN_LOCK_UNLOCKED
;
hid
->
ctrllock
=
SPIN_LOCK_UNLOCKED
;
hid
->
version
=
hdesc
->
bcdHID
;
hid
->
version
=
le16_to_cpu
(
hdesc
->
bcdHID
)
;
hid
->
country
=
hdesc
->
bCountryCode
;
hid
->
dev
=
dev
;
hid
->
ifnum
=
interface
->
bInterfaceNumber
;
...
...
include/asm-ppc/cache.h
View file @
a13b3df1
...
...
@@ -21,12 +21,13 @@
#define LG_L1_CACHE_LINE_SIZE 7
#define MAX_COPY_PREFETCH 1
#else
#define L1_CACHE_LINE_SIZE
32
#define L1_CACHE_LINE_SIZE
32
#define LG_L1_CACHE_LINE_SIZE 5
#define MAX_COPY_PREFETCH 4
#endif
#define L1_CACHE_BYTES L1_CACHE_LINE_SIZE
#define L1_CACHE_SHIFT LG_L1_CACHE_LINE_SIZE
#define SMP_CACHE_BYTES L1_CACHE_BYTES
#define L1_CACHE_ALIGN(x) (((x)+(L1_CACHE_BYTES-1))&~(L1_CACHE_BYTES-1))
...
...
include/asm-ppc/ide.h
View file @
a13b3df1
...
...
@@ -98,14 +98,35 @@ static __inline__ void ide_init_default_hwifs(void)
continue
;
ide_init_hwif_ports
(
&
hw
,
base
,
0
,
NULL
);
hw
.
irq
=
ide_default_irq
(
base
);
ide_register_hw
(
&
hw
);
ide_register_hw
(
&
hw
,
NULL
);
}
#endif
}
#if !defined(ide_request_irq)
#define ide_request_irq(irq,hand,flg,dev,id) request_irq((irq),(hand),(flg),(dev),(id))
#endif
#if !defined(ide_free_irq)
#define ide_free_irq(irq,dev_id) free_irq((irq), (dev_id))
#endif
#define ide_check_region(from,extent) check_region((from), (extent))
#define ide_request_region(from,extent,name) request_region((from), (extent), (name))
#define ide_release_region(from,extent) release_region((from), (extent))
extern
void
ide_fix_driveid
(
struct
hd_driveid
*
id
);
/*
* The following are not needed for the non-m68k ports
* unless direct IDE on 8xx
*/
#if (defined CONFIG_APUS || defined CONFIG_BLK_DEV_MPC8xx_IDE )
#define ATA_ARCH_ACK_INTR
#define ide_ack_intr(hwif) (hwif->hw.ack_intr ? hwif->hw.ack_intr(hwif) : 1)
#else
#define ide_ack_intr(hwif) (1)
#endif
#define ide_release_lock(lock) do {} while (0)
#define ide_get_lock(lock, hdlr, data) do {} while (0)
#endif
/* __KERNEL__ */
...
...
include/asm-ppc/kmap_types.h
View file @
a13b3df1
...
...
@@ -15,6 +15,8 @@ enum km_type {
KM_BIO_DST_IRQ
,
KM_PTE0
,
KM_PTE1
,
KM_IRQ0
,
KM_IRQ1
,
KM_TYPE_NR
};
...
...
include/asm-ppc/rtc.h
View file @
a13b3df1
...
...
@@ -58,7 +58,7 @@ static inline void get_rtc_time(struct rtc_time *time)
}
/* Set the current date and time in the real time clock. */
static
inline
void
set_rtc_time
(
struct
rtc_time
*
time
)
static
inline
int
set_rtc_time
(
struct
rtc_time
*
time
)
{
if
(
ppc_md
.
get_rtc_time
)
{
unsigned
long
nowtime
;
...
...
include/asm-ppc/unistd.h
View file @
a13b3df1
...
...
@@ -233,6 +233,12 @@
#define __NR_sched_getaffinity 223
#define __NR_security 224
#define __NR_tuxcall 225
#define __NR_sendfile64 226
#define __NR_io_setup 227
#define __NR_io_destroy 228
#define __NR_io_getevents 229
#define __NR_io_submit 230
#define __NR_io_cancel 231
#define __NR(n) #n
...
...
include/linux/input.h
View file @
a13b3df1
...
...
@@ -811,8 +811,8 @@ struct input_dev {
int
(
*
upload_effect
)(
struct
input_dev
*
dev
,
struct
ff_effect
*
effect
);
int
(
*
erase_effect
)(
struct
input_dev
*
dev
,
int
effect_id
);
struct
input_handle
*
handle
;
struct
input_dev
*
next
;
struct
list_head
h_list
;
struct
list_head
node
;
};
/*
...
...
@@ -856,6 +856,8 @@ struct input_device_id {
unsigned
long
driver_info
;
};
struct
input_handle
;
struct
input_handler
{
void
*
private
;
...
...
@@ -870,8 +872,8 @@ struct input_handler {
struct
input_device_id
*
id_table
;
struct
input_handle
*
handle
;
struct
input_handler
*
next
;
struct
list_head
h_list
;
struct
list_head
node
;
};
struct
input_handle
{
...
...
@@ -884,10 +886,15 @@ struct input_handle {
struct
input_dev
*
dev
;
struct
input_handler
*
handler
;
struct
input_handle
*
dnext
;
struct
input_handle
*
hnext
;
struct
list_head
d_node
;
struct
list_head
h_node
;
};
#define to_dev(n) container_of(n,struct input_dev,node)
#define to_handler(n) container_of(n,struct input_handler,node);
#define to_handle(n) container_of(n,struct input_handle,d_node)
#define to_handle_h(n) container_of(n,struct input_handle,h_node)
void
input_register_device
(
struct
input_dev
*
);
void
input_unregister_device
(
struct
input_dev
*
);
...
...
@@ -912,5 +919,7 @@ void input_event(struct input_dev *dev, unsigned int type, unsigned int code, in
#define input_report_ff(a,b,c) input_event(a, EV_FF, b, c)
#define input_report_ff_status(a,b,c) input_event(a, EV_FF_STATUS, b, c)
extern
struct
device_class
input_devclass
;
#endif
#endif
mm/swap.c
View file @
a13b3df1
...
...
@@ -77,7 +77,6 @@ void lru_add_drain(void)
void
__page_cache_release
(
struct
page
*
page
)
{
unsigned
long
flags
;
BUG_ON
(
page_count
(
page
)
!=
0
);
spin_lock_irqsave
(
&
_pagemap_lru_lock
,
flags
);
if
(
TestClearPageLRU
(
page
))
{
...
...
mm/vmscan.c
View file @
a13b3df1
...
...
@@ -389,8 +389,15 @@ static /* inline */ void refill_inactive(const int nr_pages_in)
prefetchw_prev_lru_page
(
page
,
&
active_list
,
flags
);
if
(
!
TestClearPageLRU
(
page
))
BUG
();
list_del
(
&
page
->
lru
);
if
(
page_count
(
page
)
==
0
)
{
/* It is currently in pagevec_release() */
SetPageLRU
(
page
);
list_add
(
&
page
->
lru
,
&
active_list
);
continue
;
}
page_cache_get
(
page
);
list_
move
(
&
page
->
lru
,
&
l_hold
);
list_
add
(
&
page
->
lru
,
&
l_hold
);
nr_pages
--
;
}
spin_unlock_irq
(
&
_pagemap_lru_lock
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment