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
bb0fd83e
Commit
bb0fd83e
authored
Mar 07, 2003
by
Anton Blanchard
Browse files
Options
Browse Files
Download
Plain Diff
Merge samba.org:/scratch/anton/linux-2.5
into samba.org:/scratch/anton/sfr
parents
fd49e80d
c3136961
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
28 additions
and
10 deletions
+28
-10
drivers/parport/ieee1284.c
drivers/parport/ieee1284.c
+1
-1
drivers/parport/ieee1284_ops.c
drivers/parport/ieee1284_ops.c
+4
-4
include/linux/jiffies.h
include/linux/jiffies.h
+9
-2
include/linux/kernel.h
include/linux/kernel.h
+11
-0
sound/pci/ac97/ac97_codec.c
sound/pci/ac97/ac97_codec.c
+2
-2
sound/pci/intel8x0.c
sound/pci/intel8x0.c
+1
-1
No files found.
drivers/parport/ieee1284.c
View file @
bb0fd83e
...
...
@@ -170,7 +170,7 @@ int parport_wait_peripheral(struct parport *port,
{
int
ret
;
int
usec
;
long
deadline
;
unsigned
long
deadline
;
unsigned
char
status
;
usec
=
port
->
physport
->
spintime
;
/* usecs of fast polling */
...
...
drivers/parport/ieee1284_ops.c
View file @
bb0fd83e
...
...
@@ -58,7 +58,7 @@ size_t parport_ieee1284_write_compat (struct parport *port,
parport_write_control
(
port
,
ctl
);
parport_data_forward
(
port
);
while
(
count
<
len
)
{
long
expire
=
jiffies
+
dev
->
timeout
;
unsigned
long
expire
=
jiffies
+
dev
->
timeout
;
long
wait
=
(
HZ
+
99
)
/
100
;
unsigned
char
mask
=
(
PARPORT_STATUS_ERROR
|
PARPORT_STATUS_BUSY
);
...
...
@@ -431,7 +431,7 @@ size_t parport_ieee1284_ecp_write_data (struct parport *port,
|
PARPORT_CONTROL_INIT
,
PARPORT_CONTROL_INIT
);
for
(
written
=
0
;
written
<
len
;
written
++
,
buf
++
)
{
long
expire
=
jiffies
+
port
->
cad
->
timeout
;
unsigned
long
expire
=
jiffies
+
port
->
cad
->
timeout
;
unsigned
char
byte
;
byte
=
*
buf
;
...
...
@@ -520,7 +520,7 @@ size_t parport_ieee1284_ecp_read_data (struct parport *port,
parport_write_control
(
port
,
ctl
|
PARPORT_CONTROL_AUTOFD
);
while
(
count
<
len
)
{
long
expire
=
jiffies
+
dev
->
timeout
;
unsigned
long
expire
=
jiffies
+
dev
->
timeout
;
unsigned
char
byte
;
int
command
;
...
...
@@ -668,7 +668,7 @@ size_t parport_ieee1284_ecp_write_addr (struct parport *port,
PARPORT_CONTROL_AUTOFD
|
PARPORT_CONTROL_INIT
);
for
(
written
=
0
;
written
<
len
;
written
++
,
buf
++
)
{
long
expire
=
jiffies
+
port
->
cad
->
timeout
;
unsigned
long
expire
=
jiffies
+
port
->
cad
->
timeout
;
unsigned
char
byte
;
byte
=
*
buf
;
...
...
include/linux/jiffies.h
View file @
bb0fd83e
#ifndef _LINUX_JIFFIES_H
#define _LINUX_JIFFIES_H
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/spinlock.h>
#include <linux/seqlock.h>
...
...
@@ -37,10 +38,16 @@ static inline u64 get_jiffies_64(void)
* good compiler would generate better code (and a really good compiler
* wouldn't care). Gcc is currently neither.
*/
#define time_after(a,b) ((long)(b) - (long)(a) < 0)
#define time_after(a,b) \
(typecheck(unsigned long, a) && \
typecheck(unsigned long, b) && \
((long)(b) - (long)(a) < 0))
#define time_before(a,b) time_after(b,a)
#define time_after_eq(a,b) ((long)(a) - (long)(b) >= 0)
#define time_after_eq(a,b) \
(typecheck(unsigned long, a) && \
typecheck(unsigned long, b) && \
((long)(a) - (long)(b) >= 0))
#define time_before_eq(a,b) time_after_eq(b,a)
#endif
include/linux/kernel.h
View file @
bb0fd83e
...
...
@@ -188,6 +188,17 @@ extern void dump_stack(void);
const typeof( ((type *)0)->member ) *__mptr = (ptr); \
(type *)( (char *)__mptr - offsetof(type,member) );})
/*
* Check at compile time that something is of a particular type.
* Always evaluates to 1 so you may use it easily in conparisons.
*/
#define typecheck(type,x) \
({ type __dummy; \
typeof(x) __dummy2; \
(void)(&__dummy == &__dummy2); \
1; \
})
#endif
/* __KERNEL__ */
#define SI_LOAD_SHIFT 16
...
...
sound/pci/ac97/ac97_codec.c
View file @
bb0fd83e
...
...
@@ -1808,7 +1808,7 @@ static void snd_ac97_get_name(ac97_t *ac97, unsigned int id, char *name)
*/
static
int
ac97_reset_wait
(
ac97_t
*
ac97
,
int
timeout
,
int
with_modem
)
{
signed
long
end_time
;
un
signed
long
end_time
;
end_time
=
jiffies
+
timeout
;
do
{
unsigned
short
ext_mid
;
...
...
@@ -1866,7 +1866,7 @@ int snd_ac97_mixer(snd_card_t * card, ac97_t * _ac97, ac97_t ** rac97)
int
err
;
ac97_t
*
ac97
;
char
name
[
64
];
signed
long
end_time
;
un
signed
long
end_time
;
static
snd_device_ops_t
ops
=
{
.
dev_free
=
snd_ac97_dev_free
,
};
...
...
sound/pci/intel8x0.c
View file @
bb0fd83e
...
...
@@ -1741,7 +1741,7 @@ static void do_delay(intel8x0_t *chip)
static
int
snd_intel8x0_ich_chip_init
(
intel8x0_t
*
chip
)
{
signed
long
end_time
;
un
signed
long
end_time
;
unsigned
int
cnt
,
status
,
nstatus
;
/* put logic to right state */
...
...
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