From 5196d20305d5e30d871111d3a876cf067dd94255 Mon Sep 17 00:00:00 2001 From: Michael Witten Date: Tue, 24 Jan 2012 22:48:04 +0000 Subject: drivers/char: comment fix: CMOS RTC update code is now in kernel/time/ntp.c This commit updates some comments to reflect the fact that code for periodically updating the CMOS RTC was moved to: kernel/time/ntp.c probably by this commit: commit 82644459c592a28a3eab682f9b88d81019ddfe8b Author: Thomas Gleixner Date: Sat Jul 21 04:37:37 2007 -0700 NTP: move the cmos update code into ntp.c i386 and sparc64 have the identical code to update the cmos clock. Move it into kernel/time/ntp.c as there are other architectures coming along with the same requirements. Signed-off-by: Michael Witten Signed-off-by: Jiri Kosina --- drivers/char/nvram.c | 2 +- drivers/char/rtc.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers/char') diff --git a/drivers/char/nvram.c b/drivers/char/nvram.c index da3cfee782d..eaade8a1ecd 100644 --- a/drivers/char/nvram.c +++ b/drivers/char/nvram.c @@ -94,7 +94,7 @@ /* Note that *all* calls to CMOS_READ and CMOS_WRITE must be done with * rtc_lock held. Due to the index-port/data-port design of the RTC, we * don't want two different things trying to get to it at once. (e.g. the - * periodic 11 min sync from time.c vs. this driver.) + * periodic 11 min sync from kernel/time/ntp.c vs. this driver.) */ #include diff --git a/drivers/char/rtc.c b/drivers/char/rtc.c index ccd124ab7ca..872e09a02d2 100644 --- a/drivers/char/rtc.c +++ b/drivers/char/rtc.c @@ -57,8 +57,8 @@ * Note that *all* calls to CMOS_READ and CMOS_WRITE are done with * interrupts disabled. Due to the index-port/data-port (0x70/0x71) * design of the RTC, we don't want two different things trying to - * get to it at once. (e.g. the periodic 11 min sync from time.c vs. - * this driver.) + * get to it at once. (e.g. the periodic 11 min sync from + * kernel/time/ntp.c vs. this driver.) */ #include -- cgit v1.2.3-70-g09d2 From a7ccf3775219bfcb2e0df73619abbe13abc6408f Mon Sep 17 00:00:00 2001 From: Masanari Iida Date: Tue, 7 Feb 2012 22:33:56 +0900 Subject: char: Fix typo in viotape.c Correct spelling "allocat" to "allocate" in drivers/char/viotape.c Signed-off-by: Masanari Iida Signed-off-by: Jiri Kosina --- drivers/char/viotape.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/char') diff --git a/drivers/char/viotape.c b/drivers/char/viotape.c index ad6e64a2912..8b34c65511e 100644 --- a/drivers/char/viotape.c +++ b/drivers/char/viotape.c @@ -976,7 +976,7 @@ int __init viotap_init(void) tape_class = class_create(THIS_MODULE, "tape"); if (IS_ERR(tape_class)) { - printk(VIOTAPE_KERN_WARN "Unable to allocat class\n"); + printk(VIOTAPE_KERN_WARN "Unable to allocate class\n"); ret = PTR_ERR(tape_class); goto unreg_chrdev; } -- cgit v1.2.3-70-g09d2 From 31cf913da3664f4804a346792937a3bad15cdede Mon Sep 17 00:00:00 2001 From: Masanari Iida Date: Tue, 7 Feb 2012 23:55:52 +0900 Subject: char: Fix typo in tlclk.c Correct spelling "telclk_interrup" to "telclk_interrupt" in drivers/char/tlclk.c Signed-off-by: Masanari Iida Signed-off-by: Jiri Kosina --- drivers/char/tlclk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/char') diff --git a/drivers/char/tlclk.c b/drivers/char/tlclk.c index 0c964cdcc22..ce29e7cce52 100644 --- a/drivers/char/tlclk.c +++ b/drivers/char/tlclk.c @@ -797,7 +797,7 @@ static int __init tlclk_init(void) telclk_interrupt = (inb(TLCLK_REG7) & 0x0f); if (0x0F == telclk_interrupt ) { /* not MCPBL0010 ? */ - printk(KERN_ERR "telclk_interrup = 0x%x non-mcpbl0010 hw.\n", + printk(KERN_ERR "telclk_interrupt = 0x%x non-mcpbl0010 hw.\n", telclk_interrupt); ret = -ENXIO; goto out3; -- cgit v1.2.3-70-g09d2 From 4e70daaf05a181b6968e29e72e9f1c16a183e92c Mon Sep 17 00:00:00 2001 From: Jiri Kosina Date: Wed, 29 Feb 2012 10:29:23 +0100 Subject: tpm_tis: fix tis_lock with respect to RCU cleanup_tis() -> tpm_remove_hardware() -> syncrhonize_rcu() is being called in an atomic context (tis_lock spinlock held), which is not allowed. Convert tis_lock to mutex. Signed-off-by: Jiri Kosina Tested-by: Stefan Berger Acked-by: Rajiv Andrade --- drivers/char/tpm/tpm_tis.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'drivers/char') diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c index a1748621111..70fac9abb0e 100644 --- a/drivers/char/tpm/tpm_tis.c +++ b/drivers/char/tpm/tpm_tis.c @@ -76,7 +76,7 @@ enum tis_defaults { #define TPM_RID(l) (0x0F04 | ((l) << 12)) static LIST_HEAD(tis_chips); -static DEFINE_SPINLOCK(tis_lock); +static DEFINE_MUTEX(tis_lock); #if defined(CONFIG_PNP) && defined(CONFIG_ACPI) static int is_itpm(struct pnp_dev *dev) @@ -689,9 +689,9 @@ static int tpm_tis_init(struct device *dev, resource_size_t start, } INIT_LIST_HEAD(&chip->vendor.list); - spin_lock(&tis_lock); + mutex_lock(&tis_lock); list_add(&chip->vendor.list, &tis_chips); - spin_unlock(&tis_lock); + mutex_unlock(&tis_lock); return 0; @@ -855,7 +855,7 @@ static void __exit cleanup_tis(void) { struct tpm_vendor_specific *i, *j; struct tpm_chip *chip; - spin_lock(&tis_lock); + mutex_lock(&tis_lock); list_for_each_entry_safe(i, j, &tis_chips, list) { chip = to_tpm_chip(i); tpm_remove_hardware(chip->dev); @@ -871,7 +871,7 @@ static void __exit cleanup_tis(void) iounmap(i->iobase); list_del(&i->list); } - spin_unlock(&tis_lock); + mutex_unlock(&tis_lock); #ifdef CONFIG_PNP if (!force) { pnp_unregister_driver(&tis_pnp_driver); -- cgit v1.2.3-70-g09d2 From adfe39cd9195c35811e062578c4107db49d75436 Mon Sep 17 00:00:00 2001 From: Jiri Kosina Date: Fri, 16 Mar 2012 12:08:51 +0100 Subject: Revert "char: Fix typo in viotape.c" This reverts commit a7ccf3775219bfcb2e0df73619abbe13abc6408f. It changes deprecated code that is being removed in powerpc tree. Reported-by: Stephen Rothwell Signed-off-by: Jiri Kosina --- drivers/char/viotape.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/char') diff --git a/drivers/char/viotape.c b/drivers/char/viotape.c index 8b34c65511e..ad6e64a2912 100644 --- a/drivers/char/viotape.c +++ b/drivers/char/viotape.c @@ -976,7 +976,7 @@ int __init viotap_init(void) tape_class = class_create(THIS_MODULE, "tape"); if (IS_ERR(tape_class)) { - printk(VIOTAPE_KERN_WARN "Unable to allocate class\n"); + printk(VIOTAPE_KERN_WARN "Unable to allocat class\n"); ret = PTR_ERR(tape_class); goto unreg_chrdev; } -- cgit v1.2.3-70-g09d2