tpm_atmel.c (23d06ff700f546a6a1d63c85ade095dbd75b7ab5) | tpm_atmel.c (ee1779840d093ebf6893c97115422fb5171b54d7) |
---|---|
1/* 2 * Copyright (C) 2004 IBM Corporation 3 * 4 * Authors: 5 * Leendert van Doorn <leendert@watson.ibm.com> 6 * Dave Safford <safford@watson.ibm.com> 7 * Reiner Sailer <sailer@watson.ibm.com> 8 * Kylene Hall <kjhall@us.ibm.com> --- 127 unchanged lines hidden (view full) --- 136static void atml_plat_remove(void) 137{ 138 struct tpm_chip *chip = dev_get_drvdata(&pdev->dev); 139 struct tpm_atmel_priv *priv = chip->vendor.priv; 140 141 if (chip) { 142 tpm_chip_unregister(chip); 143 if (priv->have_region) | 1/* 2 * Copyright (C) 2004 IBM Corporation 3 * 4 * Authors: 5 * Leendert van Doorn <leendert@watson.ibm.com> 6 * Dave Safford <safford@watson.ibm.com> 7 * Reiner Sailer <sailer@watson.ibm.com> 8 * Kylene Hall <kjhall@us.ibm.com> --- 127 unchanged lines hidden (view full) --- 136static void atml_plat_remove(void) 137{ 138 struct tpm_chip *chip = dev_get_drvdata(&pdev->dev); 139 struct tpm_atmel_priv *priv = chip->vendor.priv; 140 141 if (chip) { 142 tpm_chip_unregister(chip); 143 if (priv->have_region) |
144 atmel_release_region(chip->vendor.base, 145 priv->region_size); | 144 atmel_release_region(priv->base, priv->region_size); |
146 atmel_put_base_addr(chip->vendor.iobase); 147 platform_device_unregister(pdev); 148 } 149} 150 151static SIMPLE_DEV_PM_OPS(tpm_atml_pm, tpm_pm_suspend, tpm_pm_resume); 152 153static struct platform_driver atml_drv = { --- 32 unchanged lines hidden (view full) --- 186 } 187 188 priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL); 189 if (!priv) { 190 rc = -ENOMEM; 191 goto err_unreg_dev; 192 } 193 | 145 atmel_put_base_addr(chip->vendor.iobase); 146 platform_device_unregister(pdev); 147 } 148} 149 150static SIMPLE_DEV_PM_OPS(tpm_atml_pm, tpm_pm_suspend, tpm_pm_resume); 151 152static struct platform_driver atml_drv = { --- 32 unchanged lines hidden (view full) --- 185 } 186 187 priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL); 188 if (!priv) { 189 rc = -ENOMEM; 190 goto err_unreg_dev; 191 } 192 |
193 priv->base = base; |
|
194 priv->have_region = have_region; 195 priv->region_size = region_size; 196 197 chip = tpmm_chip_alloc(&pdev->dev, &tpm_atmel); 198 if (IS_ERR(chip)) { 199 rc = PTR_ERR(chip); 200 goto err_unreg_dev; 201 } 202 203 chip->vendor.iobase = iobase; | 194 priv->have_region = have_region; 195 priv->region_size = region_size; 196 197 chip = tpmm_chip_alloc(&pdev->dev, &tpm_atmel); 198 if (IS_ERR(chip)) { 199 rc = PTR_ERR(chip); 200 goto err_unreg_dev; 201 } 202 203 chip->vendor.iobase = iobase; |
204 chip->vendor.base = base; | |
205 chip->vendor.priv = priv; 206 207 rc = tpm_chip_register(chip); 208 if (rc) 209 goto err_unreg_dev; 210 211 return 0; 212 --- 25 unchanged lines hidden --- | 204 chip->vendor.priv = priv; 205 206 rc = tpm_chip_register(chip); 207 if (rc) 208 goto err_unreg_dev; 209 210 return 0; 211 --- 25 unchanged lines hidden --- |