tpm_tis: fix build warning with tpm_tis_resume
[cascardo/linux.git] / drivers / char / tpm / tpm_tis.c
index ca137b5..a507006 100644 (file)
@@ -814,6 +814,7 @@ out_err:
        return rc;
 }
 
+#ifdef CONFIG_PM_SLEEP
 static void tpm_tis_reenable_interrupts(struct tpm_chip *chip)
 {
        u32 intmask;
@@ -855,6 +856,7 @@ static int tpm_tis_resume(struct device *dev)
 
        return 0;
 }
+#endif
 
 static SIMPLE_DEV_PM_OPS(tpm_tis_pm, tpm_pm_suspend, tpm_tis_resume);
 
@@ -930,8 +932,10 @@ static int tpm_check_resource(struct acpi_resource *ares, void *data)
 
        if (acpi_dev_resource_interrupt(ares, 0, &res))
                tpm_info->irq = res.start;
-       else if (acpi_dev_resource_memory(ares, &res))
+       else if (acpi_dev_resource_memory(ares, &res)) {
                tpm_info->res = res;
+               tpm_info->res.name = NULL;
+       }
 
        return 1;
 }