]> git.baikalelectronics.ru Git - kernel.git/commit
modpost: use a table rather than a giant if/else statement.
authorRusty Russell <rusty@rustcorp.com.au>
Thu, 12 Jan 2012 23:02:15 +0000 (09:32 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Thu, 12 Jan 2012 23:02:15 +0000 (09:32 +1030)
commit9547d10b066605878b689a9d8f5010b28c226adb
tree92d3394766c12b54c9a4fe89fe8e3f6fde89ce5a
parenta95f8af7f51b61daa8b582cbc9085a44fca12fdc
modpost: use a table rather than a giant if/else statement.

We look for symbols of form __mod_<busname>_device_table, and for all
but three cases we use a standard interation function (do_table) to
walk over the contents and dump out the aliases.

Alessandro Rubini did this first, I just repainted the bikeshed a bit.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: Alessandro Rubini <rubini@gnudd.com>
scripts/mod/file2alias.c