]> err.no Git - linux-2.6/blobdiff - drivers/char/tpm/tpm_tis.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-fixes
[linux-2.6] / drivers / char / tpm / tpm_tis.c
index a8e808461377cfd91d18cfbb2ef17c723c4ef822..13a4bdd4e4d67ff73535cd6b1cb4dece7e3aba65 100644 (file)
@@ -381,7 +381,7 @@ static struct tpm_vendor_specific tpm_tis = {
 
 static irqreturn_t tis_int_probe(int irq, void *dev_id)
 {
-       struct tpm_chip *chip = (struct tpm_chip *) dev_id;
+       struct tpm_chip *chip = dev_id;
        u32 interrupt;
 
        interrupt = ioread32(chip->vendor.iobase +
@@ -399,9 +399,9 @@ static irqreturn_t tis_int_probe(int irq, void *dev_id)
        return IRQ_HANDLED;
 }
 
-static irqreturn_t tis_int_handler(int irq, void *dev_id)
+static irqreturn_t tis_int_handler(int dummy, void *dev_id)
 {
-       struct tpm_chip *chip = (struct tpm_chip *) dev_id;
+       struct tpm_chip *chip = dev_id;
        u32 interrupt;
        int i;
 
@@ -450,6 +450,11 @@ static int tpm_tis_init(struct device *dev, resource_size_t start,
                goto out_err;
        }
 
+       if (request_locality(chip, 0) != 0) {
+               rc = -ENODEV;
+               goto out_err;
+       }
+
        vendor = ioread32(chip->vendor.iobase + TPM_DID_VID(0));
 
        /* Default timeouts */
@@ -487,11 +492,6 @@ static int tpm_tis_init(struct device *dev, resource_size_t start,
        if (intfcaps & TPM_INTF_DATA_AVAIL_INT)
                dev_dbg(dev, "\tData Avail Int Support\n");
 
-       if (request_locality(chip, 0) != 0) {
-               rc = -ENODEV;
-               goto out_err;
-       }
-
        /* INTERRUPT Setup */
        init_waitqueue_head(&chip->vendor.read_queue);
        init_waitqueue_head(&chip->vendor.int_queue);