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
nexedi
linux
Commits
da6b4703
Commit
da6b4703
authored
Apr 03, 2002
by
Dave Jones
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] The last? strtok fixes.
Hopefully this is all of them..
parent
3c22e98a
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
113 additions
and
183 deletions
+113
-183
arch/s390/kernel/s390_ksyms.c
arch/s390/kernel/s390_ksyms.c
+1
-1
arch/s390x/kernel/s390_ksyms.c
arch/s390x/kernel/s390_ksyms.c
+1
-1
drivers/net/wan/sdla_ppp.c
drivers/net/wan/sdla_ppp.c
+2
-2
drivers/scsi/aic7xxx/aic7xxx_linux.c
drivers/scsi/aic7xxx/aic7xxx_linux.c
+5
-4
drivers/scsi/aic7xxx_old.c
drivers/scsi/aic7xxx_old.c
+2
-2
drivers/scsi/tmscsim.c
drivers/scsi/tmscsim.c
+73
-78
drivers/video/amifb.c
drivers/video/amifb.c
+4
-28
drivers/video/atafb.c
drivers/video/atafb.c
+22
-44
drivers/video/aty/atyfb_base.c
drivers/video/aty/atyfb_base.c
+3
-23
No files found.
arch/s390/kernel/s390_ksyms.c
View file @
da6b4703
...
@@ -44,7 +44,7 @@ EXPORT_SYMBOL_NOVERS(strncpy);
...
@@ -44,7 +44,7 @@ EXPORT_SYMBOL_NOVERS(strncpy);
EXPORT_SYMBOL_NOVERS
(
strnlen
);
EXPORT_SYMBOL_NOVERS
(
strnlen
);
EXPORT_SYMBOL_NOVERS
(
strrchr
);
EXPORT_SYMBOL_NOVERS
(
strrchr
);
EXPORT_SYMBOL_NOVERS
(
strstr
);
EXPORT_SYMBOL_NOVERS
(
strstr
);
EXPORT_SYMBOL_NOVERS
(
str
tok
);
EXPORT_SYMBOL_NOVERS
(
str
sep
);
EXPORT_SYMBOL_NOVERS
(
strpbrk
);
EXPORT_SYMBOL_NOVERS
(
strpbrk
);
/*
/*
...
...
arch/s390x/kernel/s390_ksyms.c
View file @
da6b4703
...
@@ -47,7 +47,7 @@ EXPORT_SYMBOL_NOVERS(strncpy);
...
@@ -47,7 +47,7 @@ EXPORT_SYMBOL_NOVERS(strncpy);
EXPORT_SYMBOL_NOVERS
(
strnlen
);
EXPORT_SYMBOL_NOVERS
(
strnlen
);
EXPORT_SYMBOL_NOVERS
(
strrchr
);
EXPORT_SYMBOL_NOVERS
(
strrchr
);
EXPORT_SYMBOL_NOVERS
(
strstr
);
EXPORT_SYMBOL_NOVERS
(
strstr
);
EXPORT_SYMBOL_NOVERS
(
str
tok
);
EXPORT_SYMBOL_NOVERS
(
str
sep
);
EXPORT_SYMBOL_NOVERS
(
strpbrk
);
EXPORT_SYMBOL_NOVERS
(
strpbrk
);
/*
/*
...
...
drivers/net/wan/sdla_ppp.c
View file @
da6b4703
...
@@ -1463,11 +1463,11 @@ static int tokenize (char *str, char **tokens)
...
@@ -1463,11 +1463,11 @@ static int tokenize (char *str, char **tokens)
{
{
int
cnt
=
0
;
int
cnt
=
0
;
tokens
[
0
]
=
str
tok
(
str
,
"/"
);
tokens
[
0
]
=
str
sep
(
&
str
,
"/"
);
while
(
tokens
[
cnt
]
&&
(
cnt
<
32
-
1
))
while
(
tokens
[
cnt
]
&&
(
cnt
<
32
-
1
))
{
{
tokens
[
cnt
]
=
strstrip
(
tokens
[
cnt
],
"
\t
"
);
tokens
[
cnt
]
=
strstrip
(
tokens
[
cnt
],
"
\t
"
);
tokens
[
++
cnt
]
=
str
tok
(
NULL
,
"/"
);
tokens
[
++
cnt
]
=
str
sep
(
&
str
,
"/"
);
}
}
return
cnt
;
return
cnt
;
}
}
...
...
drivers/scsi/aic7xxx/aic7xxx_linux.c
View file @
da6b4703
...
@@ -906,7 +906,7 @@ ahc_softc_comp(struct ahc_softc *lahc, struct ahc_softc *rahc)
...
@@ -906,7 +906,7 @@ ahc_softc_comp(struct ahc_softc *lahc, struct ahc_softc *rahc)
}
}
static
void
static
void
ahc_linux_setup_tag_info
(
char
*
p
,
char
*
end
)
ahc_linux_setup_tag_info
(
char
*
p
,
char
*
end
,
char
*
s
)
{
{
char
*
base
;
char
*
base
;
char
*
tok
;
char
*
tok
;
...
@@ -986,7 +986,7 @@ ahc_linux_setup_tag_info(char *p, char *end)
...
@@ -986,7 +986,7 @@ ahc_linux_setup_tag_info(char *p, char *end)
}
}
}
}
while
((
p
!=
base
)
&&
(
p
!=
NULL
))
while
((
p
!=
base
)
&&
(
p
!=
NULL
))
p
=
str
tok
(
NULL
,
",."
);
p
=
str
sep
(
&
s
,
",."
);
}
}
/*
/*
...
@@ -1018,7 +1018,8 @@ aic7xxx_setup(char *s)
...
@@ -1018,7 +1018,8 @@ aic7xxx_setup(char *s)
end
=
strchr
(
s
,
'\0'
);
end
=
strchr
(
s
,
'\0'
);
for
(
p
=
strtok
(
s
,
",."
);
p
;
p
=
strtok
(
NULL
,
",."
))
{
while
((
p
=
strsep
(
&
s
,
",."
))
!=
NULL
)
{
if
(
!*
p
)
continue
;
for
(
i
=
0
;
i
<
NUM_ELEMENTS
(
options
);
i
++
)
{
for
(
i
=
0
;
i
<
NUM_ELEMENTS
(
options
);
i
++
)
{
n
=
strlen
(
options
[
i
].
name
);
n
=
strlen
(
options
[
i
].
name
);
...
@@ -1026,7 +1027,7 @@ aic7xxx_setup(char *s)
...
@@ -1026,7 +1027,7 @@ aic7xxx_setup(char *s)
continue
;
continue
;
if
(
strncmp
(
p
,
"tag_info"
,
n
)
==
0
)
{
if
(
strncmp
(
p
,
"tag_info"
,
n
)
==
0
)
{
ahc_linux_setup_tag_info
(
p
+
n
,
end
);
ahc_linux_setup_tag_info
(
p
+
n
,
end
,
s
);
}
else
if
(
p
[
n
]
==
':'
)
{
}
else
if
(
p
[
n
]
==
':'
)
{
*
(
options
[
i
].
flag
)
=
*
(
options
[
i
].
flag
)
=
simple_strtoul
(
p
+
n
+
1
,
NULL
,
0
);
simple_strtoul
(
p
+
n
+
1
,
NULL
,
0
);
...
...
drivers/scsi/aic7xxx_old.c
View file @
da6b4703
...
@@ -1443,7 +1443,7 @@ aic7xxx_setup(char *s)
...
@@ -1443,7 +1443,7 @@ aic7xxx_setup(char *s)
end
=
strchr
(
s
,
'\0'
);
end
=
strchr
(
s
,
'\0'
);
for
(
p
=
strtok
(
s
,
",."
);
p
;
p
=
strtok
(
NULL
,
",."
)
)
while
((
p
=
strsep
(
&
s
,
",."
))
!=
NULL
)
{
{
for
(
i
=
0
;
i
<
NUMBER
(
options
);
i
++
)
for
(
i
=
0
;
i
<
NUMBER
(
options
);
i
++
)
{
{
...
@@ -1525,7 +1525,7 @@ aic7xxx_setup(char *s)
...
@@ -1525,7 +1525,7 @@ aic7xxx_setup(char *s)
}
}
}
}
while
((
p
!=
base
)
&&
(
p
!=
NULL
))
while
((
p
!=
base
)
&&
(
p
!=
NULL
))
p
=
str
tok
(
NULL
,
",."
);
p
=
str
sep
(
&
s
,
",."
);
}
}
}
}
else
if
(
p
[
n
]
==
':'
)
else
if
(
p
[
n
]
==
':'
)
...
...
drivers/scsi/tmscsim.c
View file @
da6b4703
...
@@ -2468,68 +2468,68 @@ void dc390_sendstart (PACB pACB, PDCB pDCB)
...
@@ -2468,68 +2468,68 @@ void dc390_sendstart (PACB pACB, PDCB pDCB)
* '-' means no change
* '-' means no change
*******************************************************************/
*******************************************************************/
static
int
dc390_scanf
(
char
**
p1
,
char
**
p2
,
int
*
var
)
static
int
dc390_scanf
(
char
**
buffer
,
char
**
pos
,
char
**
p0
,
int
*
var
)
{
{
*
p
2
=
*
p1
;
*
p
0
=
*
pos
;
*
var
=
simple_strtoul
(
*
p
2
,
p1
,
10
);
*
var
=
simple_strtoul
(
*
p
0
,
pos
,
10
);
if
(
*
p
2
==
*
p1
)
return
-
1
;
if
(
*
p
0
==
*
pos
)
return
-
1
;
*
p
1
=
strtok
(
0
,
"
\t\n
:=,;."
);
*
p
os
=
strsep
(
buffer
,
"
\t\n
:=,;."
);
return
0
;
return
0
;
};
};
#define SCANF(
p1, p2
, var, min, max) \
#define SCANF(
buffer, pos, p0
, var, min, max) \
if (dc390_scanf (&
p1, &p2
, &var)) goto einv; \
if (dc390_scanf (&
buffer, &pos, &p0
, &var)) goto einv; \
else if (var<min || var>max) goto einv2
else if (var<min || var>max) goto einv2
static
int
dc390_yesno
(
char
**
p
,
char
*
var
,
char
bmask
)
static
int
dc390_yesno
(
char
**
buffer
,
char
**
pos
,
char
*
var
,
char
bmask
)
{
{
switch
(
**
p
)
switch
(
**
p
os
)
{
{
case
'Y'
:
*
var
|=
bmask
;
break
;
case
'Y'
:
*
var
|=
bmask
;
break
;
case
'N'
:
*
var
&=
~
bmask
;
break
;
case
'N'
:
*
var
&=
~
bmask
;
break
;
case
'-'
:
break
;
case
'-'
:
break
;
default:
return
-
1
;
default:
return
-
1
;
}
}
*
p
=
strtok
(
0
,
"
\t\n
:=,;"
);
*
p
os
=
strsep
(
buffer
,
"
\t\n
:=,;"
);
return
0
;
return
0
;
};
};
#define YESNO(
p
, var, bmask) \
#define YESNO(
buffer, pos
, var, bmask) \
if (dc390_yesno (&
p
, &var, bmask)) goto einv; \
if (dc390_yesno (&
buffer, &pos
, &var, bmask)) goto einv; \
else dc390_updateDCB (pACB, pDCB); \
else dc390_updateDCB (pACB, pDCB); \
if (!p) goto ok
if (!p) goto ok
static
int
dc390_search
(
char
**
p1
,
char
**
p2
,
char
*
var
,
char
*
txt
,
int
max
,
int
scale
,
char
*
ign
)
static
int
dc390_search
(
char
**
buffer
,
char
**
pos
,
char
**
p0
,
char
*
var
,
char
*
txt
,
int
max
,
int
scale
,
char
*
ign
)
{
{
int
dum
;
int
dum
;
if
(
!
memcmp
(
*
p
1
,
txt
,
strlen
(
txt
)))
if
(
!
memcmp
(
*
p
os
,
txt
,
strlen
(
txt
)))
{
{
*
p
2
=
strtok
(
0
,
"
\t\n
:=,;"
);
*
p
0
=
strsep
(
buffer
,
"
\t\n
:=,;"
);
if
(
!*
p
2
)
return
-
1
;
if
(
!*
p
0
)
return
-
1
;
dum
=
simple_strtoul
(
*
p
2
,
p1
,
10
);
dum
=
simple_strtoul
(
*
p
0
,
pos
,
10
);
if
(
*
p
2
==
*
p1
)
return
-
1
;
if
(
*
p
0
==
*
pos
)
return
-
1
;
if
(
dum
>=
0
&&
dum
<=
max
)
if
(
dum
>=
0
&&
dum
<=
max
)
{
*
var
=
(
dum
*
100
)
/
scale
;
}
{
*
var
=
(
dum
*
100
)
/
scale
;
}
else
return
-
2
;
else
return
-
2
;
*
p
1
=
strtok
(
0
,
"
\t\n
:=,;"
);
*
p
os
=
strsep
(
buffer
,
"
\t\n
:=,;"
);
if
(
*
ign
&&
*
p
1
&&
strlen
(
*
p1
)
>=
strlen
(
ign
)
&&
if
(
*
ign
&&
*
p
os
&&
strlen
(
*
pos
)
>=
strlen
(
ign
)
&&
!
(
memcmp
(
*
p
1
,
ign
,
strlen
(
ign
))))
!
(
memcmp
(
*
p
os
,
ign
,
strlen
(
ign
))))
*
p
1
=
strtok
(
0
,
"
\t\n
:=,;"
);
*
p
os
=
strsep
(
buffer
,
"
\t\n
:=,;"
);
}
}
return
0
;
return
0
;
};
};
#define SEARCH(
p1, p2
, var, txt, max) \
#define SEARCH(
buffer, pos, p0
, var, txt, max) \
if (dc390_search (&
p1, &p2
, (PUCHAR)(&var), txt, max, 100, "")) goto einv2; \
if (dc390_search (&
buffer, &pos, &p0
, (PUCHAR)(&var), txt, max, 100, "")) goto einv2; \
else if (!p1) goto ok2
else if (!p1) goto ok2
#define SEARCH2(
p1, p2
, var, txt, max, scale) \
#define SEARCH2(
buffer, pos, p0
, var, txt, max, scale) \
if (dc390_search (&
p1, &p2
, &var, txt, max, scale, "")) goto einv2; \
if (dc390_search (&
buffer, &pos, &p0
, &var, txt, max, scale, "")) goto einv2; \
else if (!p1) goto ok2
else if (!p1) goto ok2
#define SEARCH3(
p1, p2
, var, txt, max, scale, ign) \
#define SEARCH3(
buffer, pos, &p0
, var, txt, max, scale, ign) \
if (dc390_search (&
p1, &p2
, &var, txt, max, scale, ign)) goto einv2; \
if (dc390_search (&
buffer, &pos, p0
, &var, txt, max, scale, ign)) goto einv2; \
else if (!p1) goto ok2
else if (!p1) goto ok2
...
@@ -2565,12 +2565,9 @@ int dc390_set_info (char *buffer, int length, PACB pACB)
...
@@ -2565,12 +2565,9 @@ int dc390_set_info (char *buffer, int length, PACB pACB)
while
(
*
pos
)
while
(
*
pos
)
{
if
(
*
pos
>=
'a'
&&
*
pos
<=
'z'
)
*
pos
=
*
pos
+
'A'
-
'a'
;
pos
++
;
};
{
if
(
*
pos
>=
'a'
&&
*
pos
<=
'z'
)
*
pos
=
*
pos
+
'A'
-
'a'
;
pos
++
;
};
/* We should protect __strtok ! */
/* spin_lock (strtok_lock); */
/* Remove WS */
/* Remove WS */
pos
=
str
tok
(
buffer
,
"
\t
:
\n
=,;"
);
pos
=
str
sep
(
&
buffer
,
"
\t
:
\n
=,;"
);
if
(
!
pos
)
goto
ok
;
if
(
!
*
pos
)
goto
ok
;
next:
next:
if
(
!
memcmp
(
pos
,
"RESET"
,
5
))
goto
reset
;
if
(
!
memcmp
(
pos
,
"RESET"
,
5
))
goto
reset
;
...
@@ -2586,10 +2583,10 @@ int dc390_set_info (char *buffer, int length, PACB pACB)
...
@@ -2586,10 +2583,10 @@ int dc390_set_info (char *buffer, int length, PACB pACB)
int
dev
,
id
,
lun
;
char
*
pdec
;
int
dev
,
id
,
lun
;
char
*
pdec
;
char
olddevmode
;
char
olddevmode
;
SCANF
(
pos
,
p0
,
dev
,
0
,
pACB
->
DCBCnt
-
1
);
SCANF
(
buffer
,
pos
,
p0
,
dev
,
0
,
pACB
->
DCBCnt
-
1
);
if
(
pos
)
{
SCANF
(
pos
,
p0
,
id
,
0
,
7
);
}
else
goto
einv
;
if
(
*
pos
)
{
SCANF
(
buffer
,
pos
,
p0
,
id
,
0
,
7
);
}
else
goto
einv
;
if
(
pos
)
{
SCANF
(
pos
,
p0
,
lun
,
0
,
7
);
}
else
goto
einv
;
if
(
*
pos
)
{
SCANF
(
buffer
,
pos
,
p0
,
lun
,
0
,
7
);
}
else
goto
einv
;
if
(
!
pos
)
goto
einv
;
if
(
!
*
pos
)
goto
einv
;
PARSEDEBUG
(
printk
(
KERN_INFO
"DC390: config line %i %i %i:
\"
%s
\"\n
"
,
dev
,
id
,
lun
,
prstr
(
pos
,
&
buffer
[
length
]));)
PARSEDEBUG
(
printk
(
KERN_INFO
"DC390: config line %i %i %i:
\"
%s
\"\n
"
,
dev
,
id
,
lun
,
prstr
(
pos
,
&
buffer
[
length
]));)
pDCB
=
pACB
->
pLinkDCB
;
pDCB
=
pACB
->
pLinkDCB
;
...
@@ -2610,20 +2607,20 @@ int dc390_set_info (char *buffer, int length, PACB pACB)
...
@@ -2610,20 +2607,20 @@ int dc390_set_info (char *buffer, int length, PACB pACB)
};
};
olddevmode
=
pDCB
->
DevMode
;
olddevmode
=
pDCB
->
DevMode
;
YESNO
(
pos
,
pDCB
->
DevMode
,
PARITY_CHK_
);
YESNO
(
buffer
,
pos
,
pDCB
->
DevMode
,
PARITY_CHK_
);
needs_inquiry
++
;
needs_inquiry
++
;
YESNO
(
pos
,
pDCB
->
DevMode
,
SYNC_NEGO_
);
YESNO
(
buffer
,
pos
,
pDCB
->
DevMode
,
SYNC_NEGO_
);
if
((
olddevmode
&
SYNC_NEGO_
)
==
(
pDCB
->
DevMode
&
SYNC_NEGO_
))
needs_inquiry
--
;
if
((
olddevmode
&
SYNC_NEGO_
)
==
(
pDCB
->
DevMode
&
SYNC_NEGO_
))
needs_inquiry
--
;
needs_inquiry
++
;
needs_inquiry
++
;
YESNO
(
pos
,
pDCB
->
DevMode
,
EN_DISCONNECT_
);
YESNO
(
buffer
,
pos
,
pDCB
->
DevMode
,
EN_DISCONNECT_
);
if
((
olddevmode
&
EN_DISCONNECT_
)
==
(
pDCB
->
DevMode
&
EN_DISCONNECT_
))
needs_inquiry
--
;
if
((
olddevmode
&
EN_DISCONNECT_
)
==
(
pDCB
->
DevMode
&
EN_DISCONNECT_
))
needs_inquiry
--
;
YESNO
(
pos
,
pDCB
->
DevMode
,
SEND_START_
);
YESNO
(
buffer
,
pos
,
pDCB
->
DevMode
,
SEND_START_
);
needs_inquiry
++
;
needs_inquiry
++
;
YESNO
(
pos
,
pDCB
->
DevMode
,
TAG_QUEUEING_
);
YESNO
(
buffer
,
pos
,
pDCB
->
DevMode
,
TAG_QUEUEING_
);
if
((
olddevmode
&
TAG_QUEUEING_
)
==
(
pDCB
->
DevMode
&
TAG_QUEUEING_
))
needs_inquiry
--
;
if
((
olddevmode
&
TAG_QUEUEING_
)
==
(
pDCB
->
DevMode
&
TAG_QUEUEING_
))
needs_inquiry
--
;
dc390_updateDCB
(
pACB
,
pDCB
);
dc390_updateDCB
(
pACB
,
pDCB
);
if
(
!
pos
)
goto
ok
;
if
(
!
*
pos
)
goto
ok
;
olddevmode
=
pDCB
->
NegoPeriod
;
olddevmode
=
pDCB
->
NegoPeriod
;
/* Look for decimal point (Speed) */
/* Look for decimal point (Speed) */
...
@@ -2632,22 +2629,22 @@ int dc390_set_info (char *buffer, int length, PACB pACB)
...
@@ -2632,22 +2629,22 @@ int dc390_set_info (char *buffer, int length, PACB pACB)
/* NegoPeriod */
/* NegoPeriod */
if
(
*
pos
!=
'-'
)
if
(
*
pos
!=
'-'
)
{
{
SCANF
(
pos
,
p0
,
dum
,
72
,
800
);
SCANF
(
buffer
,
pos
,
p0
,
dum
,
72
,
800
);
pDCB
->
NegoPeriod
=
dum
>>
2
;
pDCB
->
NegoPeriod
=
dum
>>
2
;
if
(
pDCB
->
NegoPeriod
!=
olddevmode
)
needs_inquiry
++
;
if
(
pDCB
->
NegoPeriod
!=
olddevmode
)
needs_inquiry
++
;
if
(
!
pos
)
goto
ok
;
if
(
!
pos
)
goto
ok
;
if
(
memcmp
(
pos
,
"NS"
,
2
)
==
0
)
pos
=
str
tok
(
0
,
"
\t\n
:=,;."
);
if
(
memcmp
(
pos
,
"NS"
,
2
)
==
0
)
pos
=
str
sep
(
*
pos
,
"
\t\n
:=,;."
);
}
}
else
pos
=
str
tok
(
0
,
"
\t\n
:=,;."
);
else
pos
=
str
sep
(
*
pos
,
"
\t\n
:=,;."
);
if
(
!
pos
)
goto
ok
;
if
(
!
*
pos
)
goto
ok
;
/* Sync Speed in MHz */
/* Sync Speed in MHz */
if
(
*
pos
!=
'-'
)
if
(
*
pos
!=
'-'
)
{
{
SCANF
(
pos
,
p0
,
dum
,
1
,
13
);
SCANF
(
buffer
,
pos
,
p0
,
dum
,
1
,
13
);
pDCB
->
NegoPeriod
=
(
1000
/
dum
)
>>
2
;
pDCB
->
NegoPeriod
=
(
1000
/
dum
)
>>
2
;
if
(
pDCB
->
NegoPeriod
!=
olddevmode
&&
!
pos
)
needs_inquiry
++
;
if
(
pDCB
->
NegoPeriod
!=
olddevmode
&&
!
pos
)
needs_inquiry
++
;
if
(
!
pos
)
goto
ok
;
if
(
!
*
pos
)
goto
ok
;
/* decimal */
/* decimal */
if
(
pos
-
1
==
pdec
)
if
(
pos
-
1
==
pdec
)
{
{
...
@@ -2656,38 +2653,38 @@ int dc390_set_info (char *buffer, int length, PACB pACB)
...
@@ -2656,38 +2653,38 @@ int dc390_set_info (char *buffer, int length, PACB pACB)
for
(;
p0
-
pos
>
1
;
p0
--
)
dum
/=
10
;
for
(;
p0
-
pos
>
1
;
p0
--
)
dum
/=
10
;
pDCB
->
NegoPeriod
=
(
100000
/
(
100
*
dumold
+
dum
))
>>
2
;
pDCB
->
NegoPeriod
=
(
100000
/
(
100
*
dumold
+
dum
))
>>
2
;
if
(
pDCB
->
NegoPeriod
<
19
)
pDCB
->
NegoPeriod
=
19
;
if
(
pDCB
->
NegoPeriod
<
19
)
pDCB
->
NegoPeriod
=
19
;
pos
=
str
tok
(
0
,
"
\t\n
:=,;"
);
pos
=
str
sep
(
*
pos
,
"
\t\n
:=,;"
);
if
(
!
pos
)
goto
ok
;
if
(
!
*
pos
)
goto
ok
;
};
};
if
(
*
pos
==
'M'
)
pos
=
str
tok
(
0
,
"
\t\n
:=,;"
);
if
(
*
pos
==
'M'
)
pos
=
str
sep
(
*
pos
,
"
\t\n
:=,;"
);
if
(
pDCB
->
NegoPeriod
!=
olddevmode
)
needs_inquiry
++
;
if
(
pDCB
->
NegoPeriod
!=
olddevmode
)
needs_inquiry
++
;
}
}
else
pos
=
str
tok
(
0
,
"
\t\n
:=,;"
);
else
pos
=
str
sep
(
*
pos
,
"
\t\n
:=,;"
);
/* dc390_updateDCB (pACB, pDCB); */
/* dc390_updateDCB (pACB, pDCB); */
if
(
!
pos
)
goto
ok
;
if
(
!
*
pos
)
goto
ok
;
olddevmode
=
pDCB
->
SyncOffset
;
olddevmode
=
pDCB
->
SyncOffset
;
/* SyncOffs */
/* SyncOffs */
if
(
*
pos
!=
'-'
)
if
(
*
pos
!=
'-'
)
{
{
SCANF
(
pos
,
p0
,
dum
,
0
,
0x0f
);
SCANF
(
buffer
,
pos
,
p0
,
dum
,
0
,
0x0f
);
pDCB
->
SyncOffset
=
dum
;
pDCB
->
SyncOffset
=
dum
;
if
(
pDCB
->
SyncOffset
>
olddevmode
)
needs_inquiry
++
;
if
(
pDCB
->
SyncOffset
>
olddevmode
)
needs_inquiry
++
;
}
}
else
pos
=
str
tok
(
0
,
"
\t\n
:=,;"
);
else
pos
=
str
sep
(
*
pos
,
"
\t\n
:=,;"
);
if
(
!
pos
)
goto
ok
;
if
(
!
*
pos
)
goto
ok
;
dc390_updateDCB
(
pACB
,
pDCB
);
dc390_updateDCB
(
pACB
,
pDCB
);
//olddevmode = pDCB->MaxCommand;
//olddevmode = pDCB->MaxCommand;
/* MaxCommand (Tags) */
/* MaxCommand (Tags) */
if
(
*
pos
!=
'-'
)
if
(
*
pos
!=
'-'
)
{
{
SCANF
(
pos
,
p0
,
dum
,
1
,
32
/*pACB->TagMaxNum*/
);
SCANF
(
buffer
,
pos
,
p0
,
dum
,
1
,
32
/*pACB->TagMaxNum*/
);
if
(
pDCB
->
SyncMode
&
EN_TAG_QUEUEING
)
if
(
pDCB
->
SyncMode
&
EN_TAG_QUEUEING
)
pDCB
->
MaxCommand
=
dum
;
pDCB
->
MaxCommand
=
dum
;
else
printk
(
KERN_INFO
"DC390: Can't set MaxCmd larger than one without Tag Queueing!
\n
"
);
else
printk
(
KERN_INFO
"DC390: Can't set MaxCmd larger than one without Tag Queueing!
\n
"
);
}
}
else
pos
=
str
tok
(
0
,
"
\t\n
:=,;"
);
else
pos
=
str
sep
(
*
pos
,
"
\t\n
:=,;"
);
}
}
else
else
...
@@ -2696,14 +2693,14 @@ int dc390_set_info (char *buffer, int length, PACB pACB)
...
@@ -2696,14 +2693,14 @@ int dc390_set_info (char *buffer, int length, PACB pACB)
PARSEDEBUG
(
printk
(
KERN_INFO
"DC390: chg adapt cfg
\"
%s
\"\n
"
,
prstr
(
pos
,
&
buffer
[
length
]));)
PARSEDEBUG
(
printk
(
KERN_INFO
"DC390: chg adapt cfg
\"
%s
\"\n
"
,
prstr
(
pos
,
&
buffer
[
length
]));)
dum
=
GLITCH_TO_NS
(
pACB
->
glitch_cfg
);
dum
=
GLITCH_TO_NS
(
pACB
->
glitch_cfg
);
/* Adapter setting */
/* Adapter setting */
SEARCH
(
pos
,
p0
,
pACB
->
pScsiHost
->
max_id
,
"MAXID"
,
8
);
SEARCH
(
buffer
,
pos
,
p0
,
pACB
->
pScsiHost
->
max_id
,
"MAXID"
,
8
);
SEARCH
(
pos
,
p0
,
pACB
->
pScsiHost
->
max_lun
,
"MAXLUN"
,
8
);
SEARCH
(
buffer
,
pos
,
p0
,
pACB
->
pScsiHost
->
max_lun
,
"MAXLUN"
,
8
);
SEARCH
(
pos
,
p0
,
newadaptid
,
"ADAPTERID"
,
7
);
SEARCH
(
buffer
,
pos
,
p0
,
newadaptid
,
"ADAPTERID"
,
7
);
SEARCH
(
pos
,
p0
,
pACB
->
TagMaxNum
,
"TAGMAXNUM"
,
32
);
SEARCH
(
buffer
,
pos
,
p0
,
pACB
->
TagMaxNum
,
"TAGMAXNUM"
,
32
);
SEARCH
(
pos
,
p0
,
pACB
->
ACBFlag
,
"ACBFLAG"
,
255
);
SEARCH
(
buffer
,
pos
,
p0
,
pACB
->
ACBFlag
,
"ACBFLAG"
,
255
);
SEARCH3
(
pos
,
p0
,
dum
,
"GLITCHEATER"
,
40
,
1000
,
"NS"
);
SEARCH3
(
buffer
,
pos
,
p0
,
dum
,
"GLITCHEATER"
,
40
,
1000
,
"NS"
);
SEARCH3
(
pos
,
p0
,
pACB
->
sel_timeout
,
"SELTIMEOUT"
,
400
,
163
,
"MS"
);
SEARCH3
(
buffer
,
pos
,
p0
,
pACB
->
sel_timeout
,
"SELTIMEOUT"
,
400
,
163
,
"MS"
);
SEARCH3
(
pos
,
p0
,
dc390_eepromBuf
[
pACB
->
AdapterIndex
][
EE_DELAY
],
"DELAYRESET"
,
180
,
100
,
"S"
);
SEARCH3
(
buffer
,
pos
,
p0
,
dc390_eepromBuf
[
pACB
->
AdapterIndex
][
EE_DELAY
],
"DELAYRESET"
,
180
,
100
,
"S"
);
ok2:
ok2:
pACB
->
glitch_cfg
=
NS_TO_GLITCH
(
dum
);
pACB
->
glitch_cfg
=
NS_TO_GLITCH
(
dum
);
if
(
pACB
->
sel_timeout
<
60
)
pACB
->
sel_timeout
=
60
;
if
(
pACB
->
sel_timeout
<
60
)
pACB
->
sel_timeout
=
60
;
...
@@ -2719,10 +2716,9 @@ int dc390_set_info (char *buffer, int length, PACB pACB)
...
@@ -2719,10 +2716,9 @@ int dc390_set_info (char *buffer, int length, PACB pACB)
// All devs should be INQUIRED now
// All devs should be INQUIRED now
if
(
pos
==
p1
)
goto
einv
;
if
(
pos
==
p1
)
goto
einv
;
}
}
if
(
pos
)
goto
next
;
if
(
*
pos
)
goto
next
;
ok:
ok:
/* spin_unlock (strtok_lock); */
DC390_UNLOCK_ACB
;
DC390_UNLOCK_ACB
;
if
(
needs_inquiry
)
if
(
needs_inquiry
)
{
dc390_updateDCB
(
pACB
,
pDCB
);
dc390_inquiry
(
pACB
,
pDCB
);
};
{
dc390_updateDCB
(
pACB
,
pDCB
);
dc390_inquiry
(
pACB
,
pDCB
);
};
...
@@ -2732,7 +2728,6 @@ int dc390_set_info (char *buffer, int length, PACB pACB)
...
@@ -2732,7 +2728,6 @@ int dc390_set_info (char *buffer, int length, PACB pACB)
einv2:
einv2:
pos
=
p0
;
pos
=
p0
;
einv:
einv:
/* spin_unlock (strtok_lock); */
DC390_UNLOCK_ACB
;
DC390_UNLOCK_ACB
;
DC390_UNLOCK_IO
(
pACB
.
pScsiHost
);
DC390_UNLOCK_IO
(
pACB
.
pScsiHost
);
printk
(
KERN_WARNING
"DC390: parse error near
\"
%s
\"\n
"
,
(
pos
?
pos
:
"NULL"
));
printk
(
KERN_WARNING
"DC390: parse error near
\"
%s
\"\n
"
,
(
pos
?
pos
:
"NULL"
));
...
@@ -2758,7 +2753,7 @@ int dc390_set_info (char *buffer, int length, PACB pACB)
...
@@ -2758,7 +2753,7 @@ int dc390_set_info (char *buffer, int length, PACB pACB)
inquiry:
inquiry:
{
{
pos
=
str
tok
(
0
,
"
\t\n
.:;="
);
if
(
!
pos
)
goto
einv
;
pos
=
str
sep
(
*
pos
,
"
\t\n
.:;="
);
if
(
!*
pos
)
goto
einv
;
dev
=
simple_strtoul
(
pos
,
&
p0
,
10
);
dev
=
simple_strtoul
(
pos
,
&
p0
,
10
);
if
(
dev
>=
pACB
->
DCBCnt
)
goto
einv_dev
;
if
(
dev
>=
pACB
->
DCBCnt
)
goto
einv_dev
;
for
(
dum
=
0
;
dum
<
dev
;
dum
++
)
pDCB
=
pDCB
->
pNextDCB
;
for
(
dum
=
0
;
dum
<
dev
;
dum
++
)
pDCB
=
pDCB
->
pNextDCB
;
...
@@ -2772,7 +2767,7 @@ int dc390_set_info (char *buffer, int length, PACB pACB)
...
@@ -2772,7 +2767,7 @@ int dc390_set_info (char *buffer, int length, PACB pACB)
remove:
remove:
{
{
pos
=
str
tok
(
0
,
"
\t\n
.:;="
);
if
(
!
pos
)
goto
einv
;
pos
=
str
sep
(
*
pos
,
"
\t\n
.:;="
);
if
(
!*
pos
)
goto
einv
;
dev
=
simple_strtoul
(
pos
,
&
p0
,
10
);
dev
=
simple_strtoul
(
pos
,
&
p0
,
10
);
if
(
dev
>=
pACB
->
DCBCnt
)
goto
einv_dev
;
if
(
dev
>=
pACB
->
DCBCnt
)
goto
einv_dev
;
for
(
dum
=
0
;
dum
<
dev
;
dum
++
)
pDCB
=
pDCB
->
pNextDCB
;
for
(
dum
=
0
;
dum
<
dev
;
dum
++
)
pDCB
=
pDCB
->
pNextDCB
;
...
@@ -2788,9 +2783,9 @@ int dc390_set_info (char *buffer, int length, PACB pACB)
...
@@ -2788,9 +2783,9 @@ int dc390_set_info (char *buffer, int length, PACB pACB)
add:
add:
{
{
int
id
,
lun
;
int
id
,
lun
;
pos
=
str
tok
(
0
,
"
\t\n
.:;="
);
pos
=
str
sep
(
*
pos
,
"
\t\n
.:;="
);
if
(
pos
)
{
SCANF
(
pos
,
p0
,
id
,
0
,
7
);
}
else
goto
einv
;
if
(
*
pos
)
{
SCANF
(
buffer
,
pos
,
p0
,
id
,
0
,
7
);
}
else
goto
einv
;
if
(
pos
)
{
SCANF
(
pos
,
p0
,
lun
,
0
,
7
);
}
else
goto
einv
;
if
(
*
pos
)
{
SCANF
(
buffer
,
pos
,
p0
,
lun
,
0
,
7
);
}
else
goto
einv
;
pDCB
=
dc390_findDCB
(
pACB
,
id
,
lun
);
pDCB
=
dc390_findDCB
(
pACB
,
id
,
lun
);
if
(
pDCB
)
{
printk
(
"DC390: ADD: Device already existing
\n
"
);
goto
einv
;
};
if
(
pDCB
)
{
printk
(
"DC390: ADD: Device already existing
\n
"
);
goto
einv
;
};
dc390_initDCB
(
pACB
,
&
pDCB
,
id
,
lun
);
dc390_initDCB
(
pACB
,
&
pDCB
,
id
,
lun
);
...
@@ -2803,9 +2798,9 @@ int dc390_set_info (char *buffer, int length, PACB pACB)
...
@@ -2803,9 +2798,9 @@ int dc390_set_info (char *buffer, int length, PACB pACB)
start:
start:
{
{
int
id
,
lun
;
int
id
,
lun
;
pos
=
str
tok
(
0
,
"
\t\n
.:;="
);
pos
=
str
sep
(
*
pos
,
"
\t\n
.:;="
);
if
(
pos
)
{
SCANF
(
pos
,
p0
,
id
,
0
,
7
);
}
else
goto
einv
;
if
(
*
pos
)
{
SCANF
(
buffer
,
pos
,
p0
,
id
,
0
,
7
);
}
else
goto
einv
;
if
(
pos
)
{
SCANF
(
pos
,
p0
,
lun
,
0
,
7
);
}
else
goto
einv
;
if
(
*
pos
)
{
SCANF
(
buffer
,
pos
,
p0
,
lun
,
0
,
7
);
}
else
goto
einv
;
pDCB
=
dc390_findDCB
(
pACB
,
id
,
lun
);
pDCB
=
dc390_findDCB
(
pACB
,
id
,
lun
);
if
(
pDCB
)
printk
(
"DC390: SendStart: Device already existing ...
\n
"
);
if
(
pDCB
)
printk
(
"DC390: SendStart: Device already existing ...
\n
"
);
else
dc390_initDCB
(
pACB
,
&
pDCB
,
id
,
lun
);
else
dc390_initDCB
(
pACB
,
&
pDCB
,
id
,
lun
);
...
...
drivers/video/amifb.c
View file @
da6b4703
...
@@ -1132,7 +1132,6 @@ static int flash_cursor(void);
...
@@ -1132,7 +1132,6 @@ static int flash_cursor(void);
static
void
amifb_interrupt
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
fp
);
static
void
amifb_interrupt
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
fp
);
static
u_long
chipalloc
(
u_long
size
);
static
u_long
chipalloc
(
u_long
size
);
static
void
chipfree
(
void
);
static
void
chipfree
(
void
);
static
char
*
strtoke
(
char
*
s
,
const
char
*
ct
);
/*
/*
* Hardware routines
* Hardware routines
...
@@ -1224,22 +1223,22 @@ int __init amifb_setup(char *options)
...
@@ -1224,22 +1223,22 @@ int __init amifb_setup(char *options)
* <H*> horizontal freq. in kHz
* <H*> horizontal freq. in kHz
*/
*/
if
(
!
(
p
=
str
toke
(
mcap_spec
,
";"
))
||
!*
p
)
if
(
!
(
p
=
str
sep
(
&
mcap_spec
,
";"
))
||
!*
p
)
goto
cap_invalid
;
goto
cap_invalid
;
vmin
=
simple_strtoul
(
p
,
NULL
,
10
);
vmin
=
simple_strtoul
(
p
,
NULL
,
10
);
if
(
vmin
<=
0
)
if
(
vmin
<=
0
)
goto
cap_invalid
;
goto
cap_invalid
;
if
(
!
(
p
=
str
toke
(
NULL
,
";"
))
||
!*
p
)
if
(
!
(
p
=
str
sep
(
&
mcap_spec
,
";"
))
||
!*
p
)
goto
cap_invalid
;
goto
cap_invalid
;
vmax
=
simple_strtoul
(
p
,
NULL
,
10
);
vmax
=
simple_strtoul
(
p
,
NULL
,
10
);
if
(
vmax
<=
0
||
vmax
<=
vmin
)
if
(
vmax
<=
0
||
vmax
<=
vmin
)
goto
cap_invalid
;
goto
cap_invalid
;
if
(
!
(
p
=
str
toke
(
NULL
,
";"
))
||
!*
p
)
if
(
!
(
p
=
str
sep
(
&
mcap_spec
,
";"
))
||
!*
p
)
goto
cap_invalid
;
goto
cap_invalid
;
hmin
=
1000
*
simple_strtoul
(
p
,
NULL
,
10
);
hmin
=
1000
*
simple_strtoul
(
p
,
NULL
,
10
);
if
(
hmin
<=
0
)
if
(
hmin
<=
0
)
goto
cap_invalid
;
goto
cap_invalid
;
if
(
!
(
p
=
str
toke
(
NULL
,
""
))
||
!*
p
)
if
(
!
(
p
=
str
sep
(
&
mcap_spec
,
""
))
||
!*
p
)
goto
cap_invalid
;
goto
cap_invalid
;
hmax
=
1000
*
simple_strtoul
(
p
,
NULL
,
10
);
hmax
=
1000
*
simple_strtoul
(
p
,
NULL
,
10
);
if
(
hmax
<=
0
||
hmax
<=
hmin
)
if
(
hmax
<=
0
||
hmax
<=
hmin
)
...
@@ -1915,29 +1914,6 @@ static void amifb_interrupt(int irq, void *dev_id, struct pt_regs *fp)
...
@@ -1915,29 +1914,6 @@ static void amifb_interrupt(int irq, void *dev_id, struct pt_regs *fp)
}
}
}
}
/*
* A strtok which returns empty strings, too
*/
static
char
__init
*
strtoke
(
char
*
s
,
const
char
*
ct
)
{
char
*
sbegin
,
*
send
;
static
char
*
ssave
=
NULL
;
sbegin
=
s
?
s
:
ssave
;
if
(
!
sbegin
)
return
NULL
;
if
(
*
sbegin
==
'\0'
)
{
ssave
=
NULL
;
return
NULL
;
}
send
=
strpbrk
(
sbegin
,
ct
);
if
(
send
&&
*
send
!=
'\0'
)
*
send
++
=
'\0'
;
ssave
=
send
;
return
sbegin
;
}
/* --------------------------- Hardware routines --------------------------- */
/* --------------------------- Hardware routines --------------------------- */
/*
/*
...
...
drivers/video/atafb.c
View file @
da6b4703
...
@@ -2860,28 +2860,6 @@ int __init atafb_init(void)
...
@@ -2860,28 +2860,6 @@ int __init atafb_init(void)
return
0
;
return
0
;
}
}
/* a strtok which returns empty strings, too */
static
char
*
strtoke
(
char
*
s
,
const
char
*
ct
)
{
char
*
sbegin
,
*
send
;
static
char
*
ssave
=
NULL
;
sbegin
=
s
?
s
:
ssave
;
if
(
!
sbegin
)
{
return
NULL
;
}
if
(
*
sbegin
==
'\0'
)
{
ssave
=
NULL
;
return
NULL
;
}
send
=
strpbrk
(
sbegin
,
ct
);
if
(
send
&&
*
send
!=
'\0'
)
*
send
++
=
'\0'
;
ssave
=
send
;
return
sbegin
;
}
int
__init
atafb_setup
(
char
*
options
)
int
__init
atafb_setup
(
char
*
options
)
{
{
char
*
this_opt
;
char
*
this_opt
;
...
@@ -2956,18 +2934,18 @@ int __init atafb_setup( char *options )
...
@@ -2956,18 +2934,18 @@ int __init atafb_setup( char *options )
int
xres
;
int
xres
;
char
*
p
;
char
*
p
;
if
(
!
(
p
=
str
toke
(
int_str
,
";"
))
||
!*
p
)
goto
int_invalid
;
if
(
!
(
p
=
str
sep
(
&
int_str
,
";"
))
||
!*
p
)
goto
int_invalid
;
xres
=
simple_strtoul
(
p
,
NULL
,
10
);
xres
=
simple_strtoul
(
p
,
NULL
,
10
);
if
(
!
(
p
=
str
toke
(
NULL
,
";"
))
||
!*
p
)
goto
int_invalid
;
if
(
!
(
p
=
str
sep
(
&
int_str
,
";"
))
||
!*
p
)
goto
int_invalid
;
sttt_xres
=
xres
;
sttt_xres
=
xres
;
tt_yres
=
st_yres
=
simple_strtoul
(
p
,
NULL
,
10
);
tt_yres
=
st_yres
=
simple_strtoul
(
p
,
NULL
,
10
);
if
((
p
=
str
toke
(
NULL
,
";"
))
&&
*
p
)
{
if
((
p
=
str
sep
(
&
int_str
,
";"
))
&&
*
p
)
{
sttt_xres_virtual
=
simple_strtoul
(
p
,
NULL
,
10
);
sttt_xres_virtual
=
simple_strtoul
(
p
,
NULL
,
10
);
}
}
if
((
p
=
str
toke
(
NULL
,
";"
))
&&
*
p
)
{
if
((
p
=
str
sep
(
&
int_str
,
";"
))
&&
*
p
)
{
sttt_yres_virtual
=
simple_strtoul
(
p
,
NULL
,
0
);
sttt_yres_virtual
=
simple_strtoul
(
p
,
NULL
,
0
);
}
}
if
((
p
=
str
toke
(
NULL
,
";"
))
&&
*
p
)
{
if
((
p
=
str
sep
(
&
int_str
,
";"
))
&&
*
p
)
{
ovsc_offset
=
simple_strtoul
(
p
,
NULL
,
0
);
ovsc_offset
=
simple_strtoul
(
p
,
NULL
,
0
);
}
}
...
@@ -2993,20 +2971,20 @@ int __init atafb_setup( char *options )
...
@@ -2993,20 +2971,20 @@ int __init atafb_setup( char *options )
*
*
* Even xres_virtual is available, we neither support panning nor hw-scrolling!
* Even xres_virtual is available, we neither support panning nor hw-scrolling!
*/
*/
if
(
!
(
p
=
str
toke
(
ext_str
,
";"
))
||
!*
p
)
goto
ext_invalid
;
if
(
!
(
p
=
str
sep
(
&
ext_str
,
";"
))
||
!*
p
)
goto
ext_invalid
;
xres_virtual
=
xres
=
simple_strtoul
(
p
,
NULL
,
10
);
xres_virtual
=
xres
=
simple_strtoul
(
p
,
NULL
,
10
);
if
(
xres
<=
0
)
goto
ext_invalid
;
if
(
xres
<=
0
)
goto
ext_invalid
;
if
(
!
(
p
=
str
toke
(
NULL
,
";"
))
||
!*
p
)
goto
ext_invalid
;
if
(
!
(
p
=
str
sep
(
&
ext_str
,
";"
))
||
!*
p
)
goto
ext_invalid
;
yres
=
simple_strtoul
(
p
,
NULL
,
10
);
yres
=
simple_strtoul
(
p
,
NULL
,
10
);
if
(
yres
<=
0
)
goto
ext_invalid
;
if
(
yres
<=
0
)
goto
ext_invalid
;
if
(
!
(
p
=
str
toke
(
NULL
,
";"
))
||
!*
p
)
goto
ext_invalid
;
if
(
!
(
p
=
str
sep
(
&
ext_str
,
";"
))
||
!*
p
)
goto
ext_invalid
;
depth
=
simple_strtoul
(
p
,
NULL
,
10
);
depth
=
simple_strtoul
(
p
,
NULL
,
10
);
if
(
depth
!=
1
&&
depth
!=
2
&&
depth
!=
4
&&
depth
!=
8
&&
if
(
depth
!=
1
&&
depth
!=
2
&&
depth
!=
4
&&
depth
!=
8
&&
depth
!=
16
&&
depth
!=
24
)
goto
ext_invalid
;
depth
!=
16
&&
depth
!=
24
)
goto
ext_invalid
;
if
(
!
(
p
=
str
toke
(
NULL
,
";"
))
||
!*
p
)
goto
ext_invalid
;
if
(
!
(
p
=
str
sep
(
&
ext_str
,
";"
))
||
!*
p
)
goto
ext_invalid
;
if
(
*
p
==
'i'
)
if
(
*
p
==
'i'
)
planes
=
FB_TYPE_INTERLEAVED_PLANES
;
planes
=
FB_TYPE_INTERLEAVED_PLANES
;
else
if
(
*
p
==
'p'
)
else
if
(
*
p
==
'p'
)
...
@@ -3019,19 +2997,19 @@ int __init atafb_setup( char *options )
...
@@ -3019,19 +2997,19 @@ int __init atafb_setup( char *options )
goto
ext_invalid
;
goto
ext_invalid
;
if
(
!
(
p
=
str
toke
(
NULL
,
";"
))
||
!*
p
)
goto
ext_invalid
;
if
(
!
(
p
=
str
sep
(
&
ext_str
,
";"
))
||
!*
p
)
goto
ext_invalid
;
addr
=
simple_strtoul
(
p
,
NULL
,
0
);
addr
=
simple_strtoul
(
p
,
NULL
,
0
);
if
(
!
(
p
=
str
toke
(
NULL
,
";"
))
||
!*
p
)
if
(
!
(
p
=
str
sep
(
&
ext_str
,
";"
))
||
!*
p
)
len
=
xres
*
yres
*
depth
/
8
;
len
=
xres
*
yres
*
depth
/
8
;
else
else
len
=
simple_strtoul
(
p
,
NULL
,
0
);
len
=
simple_strtoul
(
p
,
NULL
,
0
);
if
((
p
=
str
toke
(
NULL
,
";"
))
&&
*
p
)
{
if
((
p
=
str
sep
(
&
ext_str
,
";"
))
&&
*
p
)
{
external_vgaiobase
=
simple_strtoul
(
p
,
NULL
,
0
);
external_vgaiobase
=
simple_strtoul
(
p
,
NULL
,
0
);
}
}
if
((
p
=
str
toke
(
NULL
,
";"
))
&&
*
p
)
{
if
((
p
=
str
sep
(
&
ext_str
,
";"
))
&&
*
p
)
{
external_bitspercol
=
simple_strtoul
(
p
,
NULL
,
0
);
external_bitspercol
=
simple_strtoul
(
p
,
NULL
,
0
);
if
(
external_bitspercol
>
8
)
if
(
external_bitspercol
>
8
)
external_bitspercol
=
8
;
external_bitspercol
=
8
;
...
@@ -3039,14 +3017,14 @@ int __init atafb_setup( char *options )
...
@@ -3039,14 +3017,14 @@ int __init atafb_setup( char *options )
external_bitspercol
=
1
;
external_bitspercol
=
1
;
}
}
if
((
p
=
str
toke
(
NULL
,
";"
))
&&
*
p
)
{
if
((
p
=
str
sep
(
&
ext_str
,
";"
))
&&
*
p
)
{
if
(
!
strcmp
(
p
,
"vga"
))
if
(
!
strcmp
(
p
,
"vga"
))
external_card_type
=
IS_VGA
;
external_card_type
=
IS_VGA
;
if
(
!
strcmp
(
p
,
"mv300"
))
if
(
!
strcmp
(
p
,
"mv300"
))
external_card_type
=
IS_MV300
;
external_card_type
=
IS_MV300
;
}
}
if
((
p
=
str
toke
(
NULL
,
";"
))
&&
*
p
)
{
if
((
p
=
str
sep
(
&
ext_str
,
";"
))
&&
*
p
)
{
xres_virtual
=
simple_strtoul
(
p
,
NULL
,
10
);
xres_virtual
=
simple_strtoul
(
p
,
NULL
,
10
);
if
(
xres_virtual
<
xres
)
if
(
xres_virtual
<
xres
)
xres_virtual
=
xres
;
xres_virtual
=
xres
;
...
@@ -3089,16 +3067,16 @@ int __init atafb_setup( char *options )
...
@@ -3089,16 +3067,16 @@ int __init atafb_setup( char *options )
* <V*> vertical freq. in Hz
* <V*> vertical freq. in Hz
* <H*> horizontal freq. in kHz
* <H*> horizontal freq. in kHz
*/
*/
if
(
!
(
p
=
str
toke
(
mcap_spec
,
";"
))
||
!*
p
)
goto
cap_invalid
;
if
(
!
(
p
=
str
sep
(
&
mcap_spec
,
";"
))
||
!*
p
)
goto
cap_invalid
;
vmin
=
simple_strtoul
(
p
,
NULL
,
10
);
vmin
=
simple_strtoul
(
p
,
NULL
,
10
);
if
(
vmin
<=
0
)
goto
cap_invalid
;
if
(
vmin
<=
0
)
goto
cap_invalid
;
if
(
!
(
p
=
str
toke
(
NULL
,
";"
))
||
!*
p
)
goto
cap_invalid
;
if
(
!
(
p
=
str
sep
(
&
mcap_spec
,
";"
))
||
!*
p
)
goto
cap_invalid
;
vmax
=
simple_strtoul
(
p
,
NULL
,
10
);
vmax
=
simple_strtoul
(
p
,
NULL
,
10
);
if
(
vmax
<=
0
||
vmax
<=
vmin
)
goto
cap_invalid
;
if
(
vmax
<=
0
||
vmax
<=
vmin
)
goto
cap_invalid
;
if
(
!
(
p
=
str
toke
(
NULL
,
";"
))
||
!*
p
)
goto
cap_invalid
;
if
(
!
(
p
=
str
sep
(
&
mcap_spec
,
";"
))
||
!*
p
)
goto
cap_invalid
;
hmin
=
1000
*
simple_strtoul
(
p
,
NULL
,
10
);
hmin
=
1000
*
simple_strtoul
(
p
,
NULL
,
10
);
if
(
hmin
<=
0
)
goto
cap_invalid
;
if
(
hmin
<=
0
)
goto
cap_invalid
;
if
(
!
(
p
=
str
toke
(
NULL
,
""
))
||
!*
p
)
goto
cap_invalid
;
if
(
!
(
p
=
str
sep
(
&
mcap_spec
,
""
))
||
!*
p
)
goto
cap_invalid
;
hmax
=
1000
*
simple_strtoul
(
p
,
NULL
,
10
);
hmax
=
1000
*
simple_strtoul
(
p
,
NULL
,
10
);
if
(
hmax
<=
0
||
hmax
<=
hmin
)
goto
cap_invalid
;
if
(
hmax
<=
0
||
hmax
<=
hmin
)
goto
cap_invalid
;
...
@@ -3117,11 +3095,11 @@ int __init atafb_setup( char *options )
...
@@ -3117,11 +3095,11 @@ int __init atafb_setup( char *options )
char
*
p
;
char
*
p
;
int
xres
,
yres
,
depth
,
temp
;
int
xres
,
yres
,
depth
,
temp
;
if
(
!
(
p
=
str
toke
(
user_mode
,
";"
))
||
!*
p
)
goto
user_invalid
;
if
(
!
(
p
=
str
sep
(
&
user_mode
,
";"
))
||
!*
p
)
goto
user_invalid
;
xres
=
simple_strtoul
(
p
,
NULL
,
10
);
xres
=
simple_strtoul
(
p
,
NULL
,
10
);
if
(
!
(
p
=
str
toke
(
NULL
,
";"
))
||
!*
p
)
goto
user_invalid
;
if
(
!
(
p
=
str
sep
(
&
user_mode
,
";"
))
||
!*
p
)
goto
user_invalid
;
yres
=
simple_strtoul
(
p
,
NULL
,
10
);
yres
=
simple_strtoul
(
p
,
NULL
,
10
);
if
(
!
(
p
=
str
toke
(
NULL
,
""
))
||
!*
p
)
goto
user_invalid
;
if
(
!
(
p
=
str
sep
(
&
user_mode
,
""
))
||
!*
p
)
goto
user_invalid
;
depth
=
simple_strtoul
(
p
,
NULL
,
10
);
depth
=
simple_strtoul
(
p
,
NULL
,
10
);
if
((
temp
=
get_video_mode
(
"user0"
)))
{
if
((
temp
=
get_video_mode
(
"user0"
)))
{
default_par
=
temp
;
default_par
=
temp
;
...
...
drivers/video/aty/atyfb_base.c
View file @
da6b4703
...
@@ -178,7 +178,6 @@ static void atyfbcon_blank(int blank, struct fb_info *fb);
...
@@ -178,7 +178,6 @@ static void atyfbcon_blank(int blank, struct fb_info *fb);
static
int
aty_init
(
struct
fb_info_aty
*
info
,
const
char
*
name
);
static
int
aty_init
(
struct
fb_info_aty
*
info
,
const
char
*
name
);
#ifdef CONFIG_ATARI
#ifdef CONFIG_ATARI
static
int
store_video_par
(
char
*
videopar
,
unsigned
char
m64_num
);
static
int
store_video_par
(
char
*
videopar
,
unsigned
char
m64_num
);
static
char
*
strtoke
(
char
*
s
,
const
char
*
ct
);
#endif
#endif
static
void
aty_set_crtc
(
const
struct
fb_info_aty
*
info
,
static
void
aty_set_crtc
(
const
struct
fb_info_aty
*
info
,
...
@@ -2595,13 +2594,13 @@ static int __init store_video_par(char *video_str, unsigned char m64_num)
...
@@ -2595,13 +2594,13 @@ static int __init store_video_par(char *video_str, unsigned char m64_num)
printk
(
"store_video_par() '%s'
\n
"
,
video_str
);
printk
(
"store_video_par() '%s'
\n
"
,
video_str
);
if
(
!
(
p
=
str
toke
(
video_str
,
";"
))
||
!*
p
)
if
(
!
(
p
=
str
sep
(
&
video_str
,
";"
))
||
!*
p
)
goto
mach64_invalid
;
goto
mach64_invalid
;
vmembase
=
simple_strtoul
(
p
,
NULL
,
0
);
vmembase
=
simple_strtoul
(
p
,
NULL
,
0
);
if
(
!
(
p
=
str
toke
(
NULL
,
";"
))
||
!*
p
)
if
(
!
(
p
=
str
sep
(
&
video_str
,
";"
))
||
!*
p
)
goto
mach64_invalid
;
goto
mach64_invalid
;
size
=
simple_strtoul
(
p
,
NULL
,
0
);
size
=
simple_strtoul
(
p
,
NULL
,
0
);
if
(
!
(
p
=
str
toke
(
NULL
,
";"
))
||
!*
p
)
if
(
!
(
p
=
str
sep
(
&
video_str
,
";"
))
||
!*
p
)
goto
mach64_invalid
;
goto
mach64_invalid
;
guiregbase
=
simple_strtoul
(
p
,
NULL
,
0
);
guiregbase
=
simple_strtoul
(
p
,
NULL
,
0
);
...
@@ -2616,25 +2615,6 @@ static int __init store_video_par(char *video_str, unsigned char m64_num)
...
@@ -2616,25 +2615,6 @@ static int __init store_video_par(char *video_str, unsigned char m64_num)
phys_vmembase
[
m64_num
]
=
0
;
phys_vmembase
[
m64_num
]
=
0
;
return
-
1
;
return
-
1
;
}
}
static
char
__init
*
strtoke
(
char
*
s
,
const
char
*
ct
)
{
static
char
*
ssave
=
NULL
;
char
*
sbegin
,
*
send
;
sbegin
=
s
?
s
:
ssave
;
if
(
!
sbegin
)
return
NULL
;
if
(
*
sbegin
==
'\0'
)
{
ssave
=
NULL
;
return
NULL
;
}
send
=
strpbrk
(
sbegin
,
ct
);
if
(
send
&&
*
send
!=
'\0'
)
*
send
++
=
'\0'
;
ssave
=
send
;
return
sbegin
;
}
#endif
/* CONFIG_ATARI */
#endif
/* CONFIG_ATARI */
static
int
atyfbcon_switch
(
int
con
,
struct
fb_info
*
fb
)
static
int
atyfbcon_switch
(
int
con
,
struct
fb_info
*
fb
)
...
...
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