--- zzzz-none-000/linux-3.10.107/drivers/platform/x86/intel_ips.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/drivers/platform/x86/intel_ips.c 2021-02-04 17:41:59.000000000 +0000 @@ -33,7 +33,7 @@ * performance by allocating more power or thermal budget to the CPU or GPU * based on available headroom and activity. * - * The basic algorithm is driven by a 5s moving average of tempurature. If + * The basic algorithm is driven by a 5s moving average of temperature. If * thermal headroom is available, the CPU and/or GPU power clamps may be * adjusted upwards. If we hit the thermal ceiling or a thermal trigger, * we scale back the clamp. Aside from trigger events (when we're critically @@ -78,7 +78,7 @@ #include #include "intel_ips.h" -#include +#include #define PCI_DEVICE_ID_INTEL_THERMAL_SENSOR 0x3b32 @@ -269,7 +269,7 @@ /* Max temps are -10 degrees C to avoid PROCHOT# */ -struct ips_mcp_limits ips_sv_limits = { +static struct ips_mcp_limits ips_sv_limits = { .mcp_power_limit = 35000, .core_power_limit = 29000, .mch_power_limit = 20000, @@ -277,7 +277,7 @@ .mch_temp_limit = 90 }; -struct ips_mcp_limits ips_lv_limits = { +static struct ips_mcp_limits ips_lv_limits = { .mcp_power_limit = 25000, .core_power_limit = 21000, .mch_power_limit = 13000, @@ -285,7 +285,7 @@ .mch_temp_limit = 90 }; -struct ips_mcp_limits ips_ulv_limits = { +static struct ips_mcp_limits ips_ulv_limits = { .mcp_power_limit = 18000, .core_power_limit = 14000, .mch_power_limit = 11000, @@ -593,7 +593,7 @@ return; if (!ips->gpu_turbo_disable()) - dev_err(&ips->dev->dev, "failed to disable graphis turbo\n"); + dev_err(&ips->dev->dev, "failed to disable graphics turbo\n"); else ips->__gpu_turbo_on = false; } @@ -1478,7 +1478,7 @@ } EXPORT_SYMBOL_GPL(ips_link_to_i915_driver); -static DEFINE_PCI_DEVICE_TABLE(ips_id_table) = { +static const struct pci_device_id ips_id_table[] = { { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_THERMAL_SENSOR), }, { 0, } @@ -1731,18 +1731,7 @@ .shutdown = ips_shutdown, }; -static int __init ips_init(void) -{ - return pci_register_driver(&ips_pci_driver); -} -module_init(ips_init); - -static void ips_exit(void) -{ - pci_unregister_driver(&ips_pci_driver); - return; -} -module_exit(ips_exit); +module_pci_driver(ips_pci_driver); MODULE_LICENSE("GPL"); MODULE_AUTHOR("Jesse Barnes ");