PCI: Change all drivers to use pci_device->revision
[GitHub/LineageOS/android_kernel_motorola_exynos9610.git] / arch / i386 / kernel / cpu / cpufreq / gx-suspmod.c
index 6667e9cceb9fd8c3dbfe5d75a93008b27111a997..194144539a6f34ccddd67e4e7f3393b68e5fecba 100644 (file)
@@ -115,7 +115,6 @@ struct gxfreq_params {
        u8 pci_suscfg;
        u8 pci_pmer1;
        u8 pci_pmer2;
-       u8 pci_rev;
        struct pci_dev *cs55x0;
 };
 
@@ -276,7 +275,7 @@ static void gx_set_cpuspeed(unsigned int khz)
                        pci_write_config_byte(gx_params->cs55x0, PCI_VIDTC, 100);/* typical 50 to 100ms */
                        pci_write_config_byte(gx_params->cs55x0, PCI_PMER1, pmer1);
 
-                       if (gx_params->pci_rev < 0x10) {   /* CS5530(rev 1.2, 1.3) */
+                       if (gx_params->cs55x0->revision < 0x10) {   /* CS5530(rev 1.2, 1.3) */
                                suscfg = gx_params->pci_suscfg | SUSMOD;
                        } else {                           /* CS5530A,B.. */
                                suscfg = gx_params->pci_suscfg | SUSMOD | PWRSVE;
@@ -471,7 +470,6 @@ static int __init cpufreq_gx_init(void)
        pci_read_config_byte(params->cs55x0, PCI_PMER2, &(params->pci_pmer2));
        pci_read_config_byte(params->cs55x0, PCI_MODON, &(params->on_duration));
        pci_read_config_byte(params->cs55x0, PCI_MODOFF, &(params->off_duration));
-       pci_read_config_byte(params->cs55x0, PCI_REVISION_ID, &params->pci_rev);
 
        if ((ret = cpufreq_register_driver(&gx_suspmod_driver))) {
                kfree(params);