aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform/x86
diff options
context:
space:
mode:
authorHenrique de Moraes Holschuh <hmh@hmh.eng.br>2010-05-16 18:45:31 -0400
committerHenrique de Moraes Holschuh <hmh@hmh.eng.br>2010-05-16 18:45:31 -0400
commit7a43f788988ac47b21ce258197c5014b5249c9f5 (patch)
tree090a9594a041e3d8d67fcff84c1c020b2ce37403 /drivers/platform/x86
parent5d756db99a7382d5cd173e912d527e9ee73d0596 (diff)
thinkpad-acpi: move greeting messages out of the first subdriver (v2)
Move the driver initial greetings out of the first subdriver, as we do a lot of other initialization before that point, and the initial greetings should go as soon as the driver decides that it should load. These greetings are not cosmetic, they make my life easier when users report bugs. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Diffstat (limited to 'drivers/platform/x86')
-rw-r--r--drivers/platform/x86/thinkpad_acpi.c56
1 files changed, 27 insertions, 29 deletions
diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
index 1f27b350ae0..a768a69d58d 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -1888,36 +1888,9 @@ static bool __init tpacpi_is_fw_known(void)
1888 ****************************************************************************/ 1888 ****************************************************************************/
1889 1889
1890/************************************************************************* 1890/*************************************************************************
1891 * thinkpad-acpi init subdriver 1891 * thinkpad-acpi metadata subdriver
1892 */ 1892 */
1893 1893
1894static int __init thinkpad_acpi_driver_init(struct ibm_init_struct *iibm)
1895{
1896 printk(TPACPI_INFO "%s v%s\n", TPACPI_DESC, TPACPI_VERSION);
1897 printk(TPACPI_INFO "%s\n", TPACPI_URL);
1898
1899 printk(TPACPI_INFO "ThinkPad BIOS %s, EC %s\n",
1900 (thinkpad_id.bios_version_str) ?
1901 thinkpad_id.bios_version_str : "unknown",
1902 (thinkpad_id.ec_version_str) ?
1903 thinkpad_id.ec_version_str : "unknown");
1904
1905 BUG_ON(!thinkpad_id.vendor);
1906
1907 if (thinkpad_id.model_str)
1908 printk(TPACPI_INFO "%s %s, model %s\n",
1909 (thinkpad_id.vendor == PCI_VENDOR_ID_IBM) ?
1910 "IBM" : ((thinkpad_id.vendor ==
1911 PCI_VENDOR_ID_LENOVO) ?
1912 "Lenovo" : "Unknown vendor"),
1913 thinkpad_id.model_str,
1914 (thinkpad_id.nummodel_str) ?
1915 thinkpad_id.nummodel_str : "unknown");
1916
1917 tpacpi_check_outdated_fw();
1918 return 0;
1919}
1920
1921static int thinkpad_acpi_driver_read(struct seq_file *m) 1894static int thinkpad_acpi_driver_read(struct seq_file *m)
1922{ 1895{
1923 seq_printf(m, "driver:\t\t%s\n", TPACPI_DESC); 1896 seq_printf(m, "driver:\t\t%s\n", TPACPI_DESC);
@@ -8753,12 +8726,34 @@ static int __init probe_for_thinkpad(void)
8753 return 0; 8726 return 0;
8754} 8727}
8755 8728
8729static void __init thinkpad_acpi_init_banner(void)
8730{
8731 printk(TPACPI_INFO "%s v%s\n", TPACPI_DESC, TPACPI_VERSION);
8732 printk(TPACPI_INFO "%s\n", TPACPI_URL);
8733
8734 printk(TPACPI_INFO "ThinkPad BIOS %s, EC %s\n",
8735 (thinkpad_id.bios_version_str) ?
8736 thinkpad_id.bios_version_str : "unknown",
8737 (thinkpad_id.ec_version_str) ?
8738 thinkpad_id.ec_version_str : "unknown");
8739
8740 BUG_ON(!thinkpad_id.vendor);
8741
8742 if (thinkpad_id.model_str)
8743 printk(TPACPI_INFO "%s %s, model %s\n",
8744 (thinkpad_id.vendor == PCI_VENDOR_ID_IBM) ?
8745 "IBM" : ((thinkpad_id.vendor ==
8746 PCI_VENDOR_ID_LENOVO) ?
8747 "Lenovo" : "Unknown vendor"),
8748 thinkpad_id.model_str,
8749 (thinkpad_id.nummodel_str) ?
8750 thinkpad_id.nummodel_str : "unknown");
8751}
8756 8752
8757/* Module init, exit, parameters */ 8753/* Module init, exit, parameters */
8758 8754
8759static struct ibm_init_struct ibms_init[] __initdata = { 8755static struct ibm_init_struct ibms_init[] __initdata = {
8760 { 8756 {
8761 .init = thinkpad_acpi_driver_init,
8762 .data = &thinkpad_acpi_driver_data, 8757 .data = &thinkpad_acpi_driver_data,
8763 }, 8758 },
8764 { 8759 {
@@ -9028,6 +9023,9 @@ static int __init thinkpad_acpi_module_init(void)
9028 9023
9029 /* Driver initialization */ 9024 /* Driver initialization */
9030 9025
9026 thinkpad_acpi_init_banner();
9027 tpacpi_check_outdated_fw();
9028
9031 TPACPI_ACPIHANDLE_INIT(ecrd); 9029 TPACPI_ACPIHANDLE_INIT(ecrd);
9032 TPACPI_ACPIHANDLE_INIT(ecwr); 9030 TPACPI_ACPIHANDLE_INIT(ecwr);
9033 9031