aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/agp/intel-agp.h1
-rw-r--r--drivers/char/agp/intel-gtt.c3
-rw-r--r--drivers/char/apm-emulation.c2
-rw-r--r--drivers/char/hpet.c4
-rw-r--r--drivers/char/random.c11
-rw-r--r--drivers/char/tile-srom.c12
-rw-r--r--drivers/char/virtio_console.c8
7 files changed, 21 insertions, 20 deletions
diff --git a/drivers/char/agp/intel-agp.h b/drivers/char/agp/intel-agp.h
index 5da67f165afa..7ea18a5fe71c 100644
--- a/drivers/char/agp/intel-agp.h
+++ b/drivers/char/agp/intel-agp.h
@@ -234,6 +234,7 @@
234#define PCI_DEVICE_ID_INTEL_IVYBRIDGE_M_GT2_IG 0x0166 234#define PCI_DEVICE_ID_INTEL_IVYBRIDGE_M_GT2_IG 0x0166
235#define PCI_DEVICE_ID_INTEL_IVYBRIDGE_S_HB 0x0158 /* Server */ 235#define PCI_DEVICE_ID_INTEL_IVYBRIDGE_S_HB 0x0158 /* Server */
236#define PCI_DEVICE_ID_INTEL_IVYBRIDGE_S_GT1_IG 0x015A 236#define PCI_DEVICE_ID_INTEL_IVYBRIDGE_S_GT1_IG 0x015A
237#define PCI_DEVICE_ID_INTEL_IVYBRIDGE_S_GT2_IG 0x016A
237 238
238int intel_gmch_probe(struct pci_dev *pdev, 239int intel_gmch_probe(struct pci_dev *pdev,
239 struct agp_bridge_data *bridge); 240 struct agp_bridge_data *bridge);
diff --git a/drivers/char/agp/intel-gtt.c b/drivers/char/agp/intel-gtt.c
index 5cf47ac2d401..7f025fb620de 100644
--- a/drivers/char/agp/intel-gtt.c
+++ b/drivers/char/agp/intel-gtt.c
@@ -1190,7 +1190,6 @@ static inline int needs_idle_maps(void)
1190{ 1190{
1191#ifdef CONFIG_INTEL_IOMMU 1191#ifdef CONFIG_INTEL_IOMMU
1192 const unsigned short gpu_devid = intel_private.pcidev->device; 1192 const unsigned short gpu_devid = intel_private.pcidev->device;
1193 extern int intel_iommu_gfx_mapped;
1194 1193
1195 /* Query intel_iommu to see if we need the workaround. Presumably that 1194 /* Query intel_iommu to see if we need the workaround. Presumably that
1196 * was loaded first. 1195 * was loaded first.
@@ -1459,6 +1458,8 @@ static const struct intel_gtt_driver_description {
1459 "Ivybridge", &sandybridge_gtt_driver }, 1458 "Ivybridge", &sandybridge_gtt_driver },
1460 { PCI_DEVICE_ID_INTEL_IVYBRIDGE_S_GT1_IG, 1459 { PCI_DEVICE_ID_INTEL_IVYBRIDGE_S_GT1_IG,
1461 "Ivybridge", &sandybridge_gtt_driver }, 1460 "Ivybridge", &sandybridge_gtt_driver },
1461 { PCI_DEVICE_ID_INTEL_IVYBRIDGE_S_GT2_IG,
1462 "Ivybridge", &sandybridge_gtt_driver },
1462 { 0, NULL, NULL } 1463 { 0, NULL, NULL }
1463}; 1464};
1464 1465
diff --git a/drivers/char/apm-emulation.c b/drivers/char/apm-emulation.c
index 57501ca9204b..46118f845948 100644
--- a/drivers/char/apm-emulation.c
+++ b/drivers/char/apm-emulation.c
@@ -301,7 +301,7 @@ apm_ioctl(struct file *filp, u_int cmd, u_long arg)
301 * anything critical, chill a bit on each iteration. 301 * anything critical, chill a bit on each iteration.
302 */ 302 */
303 while (wait_event_freezable(apm_suspend_waitqueue, 303 while (wait_event_freezable(apm_suspend_waitqueue,
304 as->suspend_state == SUSPEND_DONE)) 304 as->suspend_state != SUSPEND_ACKED))
305 msleep(10); 305 msleep(10);
306 break; 306 break;
307 case SUSPEND_ACKTO: 307 case SUSPEND_ACKTO:
diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c
index 3845ab44c330..dfd7876f127c 100644
--- a/drivers/char/hpet.c
+++ b/drivers/char/hpet.c
@@ -906,8 +906,8 @@ int hpet_alloc(struct hpet_data *hdp)
906 hpetp->hp_which, hdp->hd_phys_address, 906 hpetp->hp_which, hdp->hd_phys_address,
907 hpetp->hp_ntimer > 1 ? "s" : ""); 907 hpetp->hp_ntimer > 1 ? "s" : "");
908 for (i = 0; i < hpetp->hp_ntimer; i++) 908 for (i = 0; i < hpetp->hp_ntimer; i++)
909 printk("%s %d", i > 0 ? "," : "", hdp->hd_irq[i]); 909 printk(KERN_CONT "%s %d", i > 0 ? "," : "", hdp->hd_irq[i]);
910 printk("\n"); 910 printk(KERN_CONT "\n");
911 911
912 temp = hpetp->hp_tick_freq; 912 temp = hpetp->hp_tick_freq;
913 remainder = do_div(temp, 1000000); 913 remainder = do_div(temp, 1000000);
diff --git a/drivers/char/random.c b/drivers/char/random.c
index 54ca8b23cde3..4ec04a754733 100644
--- a/drivers/char/random.c
+++ b/drivers/char/random.c
@@ -1260,10 +1260,15 @@ static int proc_do_uuid(ctl_table *table, int write,
1260 uuid = table->data; 1260 uuid = table->data;
1261 if (!uuid) { 1261 if (!uuid) {
1262 uuid = tmp_uuid; 1262 uuid = tmp_uuid;
1263 uuid[8] = 0;
1264 }
1265 if (uuid[8] == 0)
1266 generate_random_uuid(uuid); 1263 generate_random_uuid(uuid);
1264 } else {
1265 static DEFINE_SPINLOCK(bootid_spinlock);
1266
1267 spin_lock(&bootid_spinlock);
1268 if (!uuid[8])
1269 generate_random_uuid(uuid);
1270 spin_unlock(&bootid_spinlock);
1271 }
1267 1272
1268 sprintf(buf, "%pU", uuid); 1273 sprintf(buf, "%pU", uuid);
1269 1274
diff --git a/drivers/char/tile-srom.c b/drivers/char/tile-srom.c
index 4dc019408fac..3b22a606f79d 100644
--- a/drivers/char/tile-srom.c
+++ b/drivers/char/tile-srom.c
@@ -194,17 +194,17 @@ static ssize_t srom_read(struct file *filp, char __user *buf,
194 194
195 hv_retval = _srom_read(srom->hv_devhdl, kernbuf, 195 hv_retval = _srom_read(srom->hv_devhdl, kernbuf,
196 *f_pos, bytes_this_pass); 196 *f_pos, bytes_this_pass);
197 if (hv_retval > 0) { 197 if (hv_retval <= 0) {
198 if (copy_to_user(buf, kernbuf, hv_retval) != 0) {
199 retval = -EFAULT;
200 break;
201 }
202 } else if (hv_retval <= 0) {
203 if (retval == 0) 198 if (retval == 0)
204 retval = hv_retval; 199 retval = hv_retval;
205 break; 200 break;
206 } 201 }
207 202
203 if (copy_to_user(buf, kernbuf, hv_retval) != 0) {
204 retval = -EFAULT;
205 break;
206 }
207
208 retval += hv_retval; 208 retval += hv_retval;
209 *f_pos += hv_retval; 209 *f_pos += hv_retval;
210 buf += hv_retval; 210 buf += hv_retval;
diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
index b58b56187065..ddf86b6500b7 100644
--- a/drivers/char/virtio_console.c
+++ b/drivers/char/virtio_console.c
@@ -1038,12 +1038,6 @@ static struct attribute_group port_attribute_group = {
1038 .attrs = port_sysfs_entries, 1038 .attrs = port_sysfs_entries,
1039}; 1039};
1040 1040
1041static int debugfs_open(struct inode *inode, struct file *filp)
1042{
1043 filp->private_data = inode->i_private;
1044 return 0;
1045}
1046
1047static ssize_t debugfs_read(struct file *filp, char __user *ubuf, 1041static ssize_t debugfs_read(struct file *filp, char __user *ubuf,
1048 size_t count, loff_t *offp) 1042 size_t count, loff_t *offp)
1049{ 1043{
@@ -1087,7 +1081,7 @@ static ssize_t debugfs_read(struct file *filp, char __user *ubuf,
1087 1081
1088static const struct file_operations port_debugfs_ops = { 1082static const struct file_operations port_debugfs_ops = {
1089 .owner = THIS_MODULE, 1083 .owner = THIS_MODULE,
1090 .open = debugfs_open, 1084 .open = simple_open,
1091 .read = debugfs_read, 1085 .read = debugfs_read,
1092}; 1086};
1093 1087