tools/sdiodevs2h.awk: introduce palias
Some of the defined names are not the direct 1:1 mapping with vendor and device names used by Linux device drivers. Introduce a p(roduct)alias so we can map the one device entry I came across without much extra hassle and generate a name device drivers know about: palias BROADCOM_CYPRESS_43439 CYPRESS_43439 Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D46455
This commit is contained in:
@@ -149,6 +149,18 @@ function product(hfile)
|
||||
printf("\n") > hfile
|
||||
}
|
||||
|
||||
function palias(hfile)
|
||||
{
|
||||
nproducts++
|
||||
|
||||
products[nproducts, 1] = $2; # vendor name
|
||||
products[nproducts, 2] = $3; # product id
|
||||
products[nproducts, 3] = $4; # id
|
||||
if (hfile)
|
||||
printf("#define\tSDIO_DEVICE_ID_%s\tSDIO_DEVICE_ID_%s\n", \
|
||||
$2, $3) > hfile
|
||||
}
|
||||
|
||||
function dump_dfile(dfile)
|
||||
{
|
||||
printf("\n") > dfile
|
||||
@@ -243,6 +255,10 @@ while ((getline < srcfile) > 0) {
|
||||
product(hfile)
|
||||
continue
|
||||
}
|
||||
if ($1 == "palias") {
|
||||
palias(hfile)
|
||||
continue
|
||||
}
|
||||
if ($0 == "")
|
||||
blanklines++
|
||||
if (hfile)
|
||||
|
||||
Reference in New Issue
Block a user