aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/agp/backend.c4
-rw-r--r--drivers/char/agp/uninorth-agp.c2
-rw-r--r--drivers/char/epca.c2
-rw-r--r--drivers/char/ipmi/ipmi_poweroff.c4
-rw-r--r--drivers/char/misc.c2
-rw-r--r--drivers/char/pcmcia/cm4000_cs.c2
-rw-r--r--drivers/char/sysrq.c4
-rw-r--r--drivers/char/tpm/tpm.c4
-rw-r--r--drivers/char/tpm/tpm_bios.c4
9 files changed, 14 insertions, 14 deletions
diff --git a/drivers/char/agp/backend.c b/drivers/char/agp/backend.c
index ad87753f6de4..a56ca080e108 100644
--- a/drivers/char/agp/backend.c
+++ b/drivers/char/agp/backend.c
@@ -114,9 +114,9 @@ static int agp_find_max(void)
114 long memory, index, result; 114 long memory, index, result;
115 115
116#if PAGE_SHIFT < 20 116#if PAGE_SHIFT < 20
117 memory = num_physpages >> (20 - PAGE_SHIFT); 117 memory = totalram_pages >> (20 - PAGE_SHIFT);
118#else 118#else
119 memory = num_physpages << (PAGE_SHIFT - 20); 119 memory = totalram_pages << (PAGE_SHIFT - 20);
120#endif 120#endif
121 index = 1; 121 index = 1;
122 122
diff --git a/drivers/char/agp/uninorth-agp.c b/drivers/char/agp/uninorth-agp.c
index 20ef1bf5e726..703959eba45a 100644
--- a/drivers/char/agp/uninorth-agp.c
+++ b/drivers/char/agp/uninorth-agp.c
@@ -270,7 +270,7 @@ static void uninorth_agp_enable(struct agp_bridge_data *bridge, u32 mode)
270 270
271 if ((uninorth_rev >= 0x30) && (uninorth_rev <= 0x33)) { 271 if ((uninorth_rev >= 0x30) && (uninorth_rev <= 0x33)) {
272 /* 272 /*
273 * We need to to set REQ_DEPTH to 7 for U3 versions 1.0, 2.1, 273 * We need to set REQ_DEPTH to 7 for U3 versions 1.0, 2.1,
274 * 2.2 and 2.3, Darwin do so. 274 * 2.2 and 2.3, Darwin do so.
275 */ 275 */
276 if ((command >> AGPSTAT_RQ_DEPTH_SHIFT) > 7) 276 if ((command >> AGPSTAT_RQ_DEPTH_SHIFT) > 7)
diff --git a/drivers/char/epca.c b/drivers/char/epca.c
index ff647ca1c489..9d589e3144de 100644
--- a/drivers/char/epca.c
+++ b/drivers/char/epca.c
@@ -2239,7 +2239,7 @@ static void do_softint(struct work_struct *work)
2239 struct channel *ch = container_of(work, struct channel, tqueue); 2239 struct channel *ch = container_of(work, struct channel, tqueue);
2240 /* Called in response to a modem change event */ 2240 /* Called in response to a modem change event */
2241 if (ch && ch->magic == EPCA_MAGIC) { 2241 if (ch && ch->magic == EPCA_MAGIC) {
2242 struct tty_struct *tty = tty_port_tty_get(&ch->port);; 2242 struct tty_struct *tty = tty_port_tty_get(&ch->port);
2243 2243
2244 if (tty && tty->driver_data) { 2244 if (tty && tty->driver_data) {
2245 if (test_and_clear_bit(EPCA_EVENT_HANGUP, &ch->event)) { 2245 if (test_and_clear_bit(EPCA_EVENT_HANGUP, &ch->event)) {
diff --git a/drivers/char/ipmi/ipmi_poweroff.c b/drivers/char/ipmi/ipmi_poweroff.c
index a261bd735dfb..2e66b5f773dd 100644
--- a/drivers/char/ipmi/ipmi_poweroff.c
+++ b/drivers/char/ipmi/ipmi_poweroff.c
@@ -691,7 +691,7 @@ static struct ctl_table_header *ipmi_table_header;
691/* 691/*
692 * Startup and shutdown functions. 692 * Startup and shutdown functions.
693 */ 693 */
694static int ipmi_poweroff_init(void) 694static int __init ipmi_poweroff_init(void)
695{ 695{
696 int rv; 696 int rv;
697 697
@@ -725,7 +725,7 @@ static int ipmi_poweroff_init(void)
725} 725}
726 726
727#ifdef MODULE 727#ifdef MODULE
728static __exit void ipmi_poweroff_cleanup(void) 728static void __exit ipmi_poweroff_cleanup(void)
729{ 729{
730 int rv; 730 int rv;
731 731
diff --git a/drivers/char/misc.c b/drivers/char/misc.c
index 1ee27cc23426..07fa612a58d5 100644
--- a/drivers/char/misc.c
+++ b/drivers/char/misc.c
@@ -91,7 +91,7 @@ static int misc_seq_show(struct seq_file *seq, void *v)
91} 91}
92 92
93 93
94static struct seq_operations misc_seq_ops = { 94static const struct seq_operations misc_seq_ops = {
95 .start = misc_seq_start, 95 .start = misc_seq_start,
96 .next = misc_seq_next, 96 .next = misc_seq_next,
97 .stop = misc_seq_stop, 97 .stop = misc_seq_stop,
diff --git a/drivers/char/pcmcia/cm4000_cs.c b/drivers/char/pcmcia/cm4000_cs.c
index 881934c068c8..c250a31efa53 100644
--- a/drivers/char/pcmcia/cm4000_cs.c
+++ b/drivers/char/pcmcia/cm4000_cs.c
@@ -1017,7 +1017,7 @@ static ssize_t cmm_read(struct file *filp, __user char *buf, size_t count,
1017 } 1017 }
1018 } 1018 }
1019 1019
1020 if (dev->proto == 0 && count > dev->rlen - dev->rpos) { 1020 if (dev->proto == 0 && count > dev->rlen - dev->rpos && i) {
1021 DEBUGP(4, dev, "T=0 and count > buffer\n"); 1021 DEBUGP(4, dev, "T=0 and count > buffer\n");
1022 dev->rbuf[i] = dev->rbuf[i - 1]; 1022 dev->rbuf[i] = dev->rbuf[i - 1];
1023 dev->rbuf[i - 1] = dev->procbyte; 1023 dev->rbuf[i - 1] = dev->procbyte;
diff --git a/drivers/char/sysrq.c b/drivers/char/sysrq.c
index 50eecfe1d724..44203ff599da 100644
--- a/drivers/char/sysrq.c
+++ b/drivers/char/sysrq.c
@@ -26,7 +26,7 @@
26#include <linux/proc_fs.h> 26#include <linux/proc_fs.h>
27#include <linux/nmi.h> 27#include <linux/nmi.h>
28#include <linux/quotaops.h> 28#include <linux/quotaops.h>
29#include <linux/perf_counter.h> 29#include <linux/perf_event.h>
30#include <linux/kernel.h> 30#include <linux/kernel.h>
31#include <linux/module.h> 31#include <linux/module.h>
32#include <linux/suspend.h> 32#include <linux/suspend.h>
@@ -252,7 +252,7 @@ static void sysrq_handle_showregs(int key, struct tty_struct *tty)
252 struct pt_regs *regs = get_irq_regs(); 252 struct pt_regs *regs = get_irq_regs();
253 if (regs) 253 if (regs)
254 show_regs(regs); 254 show_regs(regs);
255 perf_counter_print_debug(); 255 perf_event_print_debug();
256} 256}
257static struct sysrq_key_op sysrq_showregs_op = { 257static struct sysrq_key_op sysrq_showregs_op = {
258 .handler = sysrq_handle_showregs, 258 .handler = sysrq_handle_showregs,
diff --git a/drivers/char/tpm/tpm.c b/drivers/char/tpm/tpm.c
index b0603b2e5684..32b957efa420 100644
--- a/drivers/char/tpm/tpm.c
+++ b/drivers/char/tpm/tpm.c
@@ -696,7 +696,7 @@ int __tpm_pcr_read(struct tpm_chip *chip, int pcr_idx, u8 *res_buf)
696 696
697 cmd.header.in = pcrread_header; 697 cmd.header.in = pcrread_header;
698 cmd.params.pcrread_in.pcr_idx = cpu_to_be32(pcr_idx); 698 cmd.params.pcrread_in.pcr_idx = cpu_to_be32(pcr_idx);
699 BUILD_BUG_ON(cmd.header.in.length > READ_PCR_RESULT_SIZE); 699 BUG_ON(cmd.header.in.length > READ_PCR_RESULT_SIZE);
700 rc = transmit_cmd(chip, &cmd, cmd.header.in.length, 700 rc = transmit_cmd(chip, &cmd, cmd.header.in.length,
701 "attempting to read a pcr value"); 701 "attempting to read a pcr value");
702 702
@@ -760,7 +760,7 @@ int tpm_pcr_extend(u32 chip_num, int pcr_idx, const u8 *hash)
760 return -ENODEV; 760 return -ENODEV;
761 761
762 cmd.header.in = pcrextend_header; 762 cmd.header.in = pcrextend_header;
763 BUILD_BUG_ON(be32_to_cpu(cmd.header.in.length) > EXTEND_PCR_SIZE); 763 BUG_ON(be32_to_cpu(cmd.header.in.length) > EXTEND_PCR_SIZE);
764 cmd.params.pcrextend_in.pcr_idx = cpu_to_be32(pcr_idx); 764 cmd.params.pcrextend_in.pcr_idx = cpu_to_be32(pcr_idx);
765 memcpy(cmd.params.pcrextend_in.hash, hash, TPM_DIGEST_SIZE); 765 memcpy(cmd.params.pcrextend_in.hash, hash, TPM_DIGEST_SIZE);
766 rc = transmit_cmd(chip, &cmd, cmd.header.in.length, 766 rc = transmit_cmd(chip, &cmd, cmd.header.in.length,
diff --git a/drivers/char/tpm/tpm_bios.c b/drivers/char/tpm/tpm_bios.c
index 0c2f55a38b95..bf2170fb1cdd 100644
--- a/drivers/char/tpm/tpm_bios.c
+++ b/drivers/char/tpm/tpm_bios.c
@@ -343,14 +343,14 @@ static int tpm_ascii_bios_measurements_show(struct seq_file *m, void *v)
343 return 0; 343 return 0;
344} 344}
345 345
346static struct seq_operations tpm_ascii_b_measurments_seqops = { 346static const struct seq_operations tpm_ascii_b_measurments_seqops = {
347 .start = tpm_bios_measurements_start, 347 .start = tpm_bios_measurements_start,
348 .next = tpm_bios_measurements_next, 348 .next = tpm_bios_measurements_next,
349 .stop = tpm_bios_measurements_stop, 349 .stop = tpm_bios_measurements_stop,
350 .show = tpm_ascii_bios_measurements_show, 350 .show = tpm_ascii_bios_measurements_show,
351}; 351};
352 352
353static struct seq_operations tpm_binary_b_measurments_seqops = { 353static const struct seq_operations tpm_binary_b_measurments_seqops = {
354 .start = tpm_bios_measurements_start, 354 .start = tpm_bios_measurements_start,
355 .next = tpm_bios_measurements_next, 355 .next = tpm_bios_measurements_next,
356 .stop = tpm_bios_measurements_stop, 356 .stop = tpm_bios_measurements_stop,