tpm_atmel.c (9b4f2e9576658c4e52d95dc8d309f51b2e2db096) tpm_atmel.c (f33d9bd50478c9a969b65f58feb6b69a3ad478cb)
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>

--- 170 unchanged lines hidden (view full) ---

179static int __init init_atmel(void)
180{
181 int rc = 0;
182 void __iomem *iobase = NULL;
183 int have_region, region_size;
184 unsigned long base;
185 struct tpm_chip *chip;
186
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>

--- 170 unchanged lines hidden (view full) ---

179static int __init init_atmel(void)
180{
181 int rc = 0;
182 void __iomem *iobase = NULL;
183 int have_region, region_size;
184 unsigned long base;
185 struct tpm_chip *chip;
186
187 driver_register(&atml_drv);
187 rc = driver_register(&atml_drv);
188 if (rc)
189 return rc;
188
189 if ((iobase = atmel_get_base_addr(&base, &region_size)) == NULL) {
190 rc = -ENODEV;
191 goto err_unreg_drv;
192 }
193
194 have_region =
195 (atmel_request_region
196 (tpm_atmel.base, region_size, "tpm_atmel0") == NULL) ? 0 : 1;
197
190
191 if ((iobase = atmel_get_base_addr(&base, &region_size)) == NULL) {
192 rc = -ENODEV;
193 goto err_unreg_drv;
194 }
195
196 have_region =
197 (atmel_request_region
198 (tpm_atmel.base, region_size, "tpm_atmel0") == NULL) ? 0 : 1;
199
198
199 if (IS_ERR
200 (pdev =
201 platform_device_register_simple("tpm_atmel", -1, NULL, 0))) {
200 pdev = platform_device_register_simple("tpm_atmel", -1, NULL, 0);
201 if (IS_ERR(pdev)) {
202 rc = PTR_ERR(pdev);
203 goto err_rel_reg;
204 }
205
206 if (!(chip = tpm_register_hardware(&pdev->dev, &tpm_atmel))) {
207 rc = -ENODEV;
208 goto err_unreg_dev;
209 }

--- 33 unchanged lines hidden ---
202 rc = PTR_ERR(pdev);
203 goto err_rel_reg;
204 }
205
206 if (!(chip = tpm_register_hardware(&pdev->dev, &tpm_atmel))) {
207 rc = -ENODEV;
208 goto err_unreg_dev;
209 }

--- 33 unchanged lines hidden ---