aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/tpm/tpm_nsc.c
AgeCommit message (Collapse)AuthorFilesLines
2005-11-07[PATCH] tpm: Fix lack of driver_unregister in init failcasesKylene Jo Hall1-25/+23
driver_unregister is not being properly called when the init function returns an error case. Restructured the return logic such that this and the other cleanups all happen in one place. Preformed many of the cleanups that Andrew Morton's patch on Thursday made in tpm_atmel.c. Fixed Matthieu's concern about writing before discovery. (akpm: rmk said: This driver is buggy. You must not provide your own release function - it doesn't solve the problem which the warning (which you get when you don't provide one) is telling you about. You should convert your device driver over to the replacement dynamic platform support, once it is merged. IOW, something like: pdev = platform_device_alloc("mydev", id); if (pdev) { err = platform_device_add_resources(pdev, &resources, ARRAY_SIZE(resources)); if (err == 0) err = platform_device_add_data(pdev, &platform_data, sizeof(platform_data)); if (err == 0) err = platform_device_add(pdev); } else { err = -ENOMEM; } if (err) platform_device_put(pdev); ) Signed-off-by: Kylene Jo Hall <kjhall@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-01[PATCH] TPM compile fixChris Wright1-0/+1
CC drivers/char/tpm/tpm_nsc.o drivers/char/tpm/tpm_nsc.c:277: error: `platform_bus_type' undeclared here (not in a function) ... CC drivers/char/tpm/tpm_atmel.o drivers/char/tpm/tpm_atmel.c:175: error: `platform_bus_type' undeclared here (not in a function) Make sure to include proper headers. Signed-off-by: Chris Wright <chrisw@osdl.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-30[PATCH] sparse cleanups: NULL pointers, C99 struct init.Randy Dunlap1-1/+1
Convert most of the remaining "Using plain integer as NULL pointer" sparse warnings to use NULL. (Not duplicating patches that are already in -mm, -bird, or -kj.) Convert isdn driver struct initializer to use C99 syntax. Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-30[PATCH] tpm: move nsc driver off pci_devKylene Jo Hall1-67/+77
This patch changes the nsc driver from a pci driver to a platform driver. Signed-off-by: Kylene Hall <kjhall@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-30[PATCH] tpm: remove pci dependencyKylene Jo Hall1-12/+20
Since the tpm does not have it's own pci id we have been consuming the lpc bus. This is not correct and causes problems to support non lpc bus chips. This patch removes the dependency on pci_dev from tpm.c The subsequent patches will stop the supported chips from registering as pci drivers. Signed-off-by: Kylene Hall <kjhall@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-30[PATCH] tpm: add status function to allow non-lpc bus chipsKylene Jo Hall1-0/+6
This patch is in preparation of supporting chips that are not necessarily on the lpc bus and thus are not accessed with inb's and outb's. The patch replaces the call to get the chip's status in the tpm.c file with a vendor specific status function. The patch also defines the function for each of the current supported devices. Signed-off-by: Kylene Hall <kjhall@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-25[PATCH] tpm: Support new National TPMsKylene Jo Hall1-55/+38
This patch is work to support new National TPMs that problems were reported with on Thinkpad T43 and Thinkcentre S51. Thanks to Jens and Gang for their debugging work on these issues. Signed-off-by: Kylene Hall <kjhall@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-24[PATCH] tpm: replace odd LPC init functionKylene Hall1-9/+13
Realized the tpm_lpc_init function isn't really necessary. Replaced it with vendor specific logic to find out the address the BIOS mapped the TPM to. This patch removes the tpm_lpc_init function, enums associated with it and calls to it. The patch also implements the replacement functionality. Signed-off-by: Kylene Hall <kjhall@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-24[PATCH] tpm: add cancel functionKylene Hall1-0/+1
This patch provides the logic to check if an operation has been canceled while waiting for the response to arrive. Signed-off-by: Kylene Hall <kjhall@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-24[PATCH] tpm: sysfs owernship changesKylene Hall1-1/+16
In the current driver all sysfs files end up owned by the base driver module rather than the module that actually owns the device this is a problem if the module is unloaded and the file is open. This patch fixes all that and lumps the files into an attribute_group. Signed-off-by: Kylene Hall <kjhall@us.ibm.com> Signed-off-by: Yani Ioannou <yani.ioannou@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-24[PATCH] tpm: Fix concerns with TPM driver -- use enumsKylene Hall1-23/+31
Convert #defines to named enums where that preference has been indicated by other kernel developers. Signed-off-by: Kylene Hall <kjhall@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-24[PATCH] char/tpm: use msleep(), clean-up timers,Nishanth Aravamudan1-22/+10
The TPM driver unnecessarily uses timers when it simply needs to maintain a maximum delay via time_before(). msleep() is used instead of schedule_timeout() to guarantee the task delays as expected. While compile-testing, I found a typo in the driver, using tpm_chp instead of tpm_chip. Remove the now unused timer callback function and change TPM_TIMEOUT's units to milliseconds. Patch is compile-tested. Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com> Acked-by: Kylene Hall <kjhall@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-16Linux-2.6.12-rc2v2.6.12-rc2Linus Torvalds1-0/+373
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!