diff options
Diffstat (limited to 'drivers/misc')
-rw-r--r-- | drivers/misc/hdpuftrs/hdpu_cpustate.c | 5 | ||||
-rw-r--r-- | drivers/misc/hdpuftrs/hdpu_nexus.c | 17 | ||||
-rw-r--r-- | drivers/misc/ibmasm/command.c | 6 | ||||
-rw-r--r-- | drivers/misc/ibmasm/heartbeat.c | 6 | ||||
-rw-r--r-- | drivers/misc/intel_menlow.c | 14 | ||||
-rw-r--r-- | drivers/misc/ioc4.c | 20 | ||||
-rw-r--r-- | drivers/misc/kgdbts.c | 2 | ||||
-rw-r--r-- | drivers/misc/phantom.c | 34 | ||||
-rw-r--r-- | drivers/misc/sgi-xp/xpc_partition.c | 4 | ||||
-rw-r--r-- | drivers/misc/sony-laptop.c | 4 |
10 files changed, 65 insertions, 47 deletions
diff --git a/drivers/misc/hdpuftrs/hdpu_cpustate.c b/drivers/misc/hdpuftrs/hdpu_cpustate.c index 302e92418bbe..ff51ab67231c 100644 --- a/drivers/misc/hdpuftrs/hdpu_cpustate.c +++ b/drivers/misc/hdpuftrs/hdpu_cpustate.c | |||
@@ -210,13 +210,10 @@ static int hdpu_cpustate_probe(struct platform_device *pdev) | |||
210 | return ret; | 210 | return ret; |
211 | } | 211 | } |
212 | 212 | ||
213 | proc_de = create_proc_entry("sky_cpustate", 0666, &proc_root); | 213 | proc_de = proc_create("sky_cpustate", 0666, NULL, &proc_cpustate); |
214 | if (!proc_de) { | 214 | if (!proc_de) { |
215 | printk(KERN_WARNING "sky_cpustate: " | 215 | printk(KERN_WARNING "sky_cpustate: " |
216 | "Unable to create proc entry\n"); | 216 | "Unable to create proc entry\n"); |
217 | } else { | ||
218 | proc_de->proc_fops = &proc_cpustate; | ||
219 | proc_de->owner = THIS_MODULE; | ||
220 | } | 217 | } |
221 | 218 | ||
222 | printk(KERN_INFO "Sky CPU State Driver v" SKY_CPUSTATE_VERSION "\n"); | 219 | printk(KERN_INFO "Sky CPU State Driver v" SKY_CPUSTATE_VERSION "\n"); |
diff --git a/drivers/misc/hdpuftrs/hdpu_nexus.c b/drivers/misc/hdpuftrs/hdpu_nexus.c index 2fa36f7a6eb3..08e26beefe64 100644 --- a/drivers/misc/hdpuftrs/hdpu_nexus.c +++ b/drivers/misc/hdpuftrs/hdpu_nexus.c | |||
@@ -102,22 +102,17 @@ static int hdpu_nexus_probe(struct platform_device *pdev) | |||
102 | printk(KERN_ERR "sky_nexus: Could not map slot id\n"); | 102 | printk(KERN_ERR "sky_nexus: Could not map slot id\n"); |
103 | } | 103 | } |
104 | 104 | ||
105 | hdpu_slot_id = create_proc_entry("sky_slot_id", 0666, &proc_root); | 105 | hdpu_slot_id = proc_create("sky_slot_id", 0666, NULL, &proc_slot_id); |
106 | if (!hdpu_slot_id) { | 106 | if (!hdpu_slot_id) { |
107 | printk(KERN_WARNING "sky_nexus: " | 107 | printk(KERN_WARNING "sky_nexus: " |
108 | "Unable to create proc dir entry: sky_slot_id\n"); | 108 | "Unable to create proc dir entry: sky_slot_id\n"); |
109 | } else { | ||
110 | hdpu_slot_id->proc_fops = &proc_slot_id; | ||
111 | hdpu_slot_id->owner = THIS_MODULE; | ||
112 | } | 109 | } |
113 | 110 | ||
114 | hdpu_chassis_id = create_proc_entry("sky_chassis_id", 0666, &proc_root); | 111 | hdpu_chassis_id = proc_create("sky_chassis_id", 0666, NULL, |
115 | if (!hdpu_chassis_id) { | 112 | &proc_chassis_id); |
113 | if (!hdpu_chassis_id) | ||
116 | printk(KERN_WARNING "sky_nexus: " | 114 | printk(KERN_WARNING "sky_nexus: " |
117 | "Unable to create proc dir entry: sky_chassis_id\n"); | 115 | "Unable to create proc dir entry: sky_chassis_id\n"); |
118 | } else { | ||
119 | hdpu_chassis_id->proc_fops = &proc_chassis_id; | ||
120 | hdpu_chassis_id->owner = THIS_MODULE; | ||
121 | } | 116 | } |
122 | 117 | ||
123 | return 0; | 118 | return 0; |
@@ -128,8 +123,8 @@ static int hdpu_nexus_remove(struct platform_device *pdev) | |||
128 | slot_id = -1; | 123 | slot_id = -1; |
129 | chassis_id = -1; | 124 | chassis_id = -1; |
130 | 125 | ||
131 | remove_proc_entry("sky_slot_id", &proc_root); | 126 | remove_proc_entry("sky_slot_id", NULL); |
132 | remove_proc_entry("sky_chassis_id", &proc_root); | 127 | remove_proc_entry("sky_chassis_id", NULL); |
133 | 128 | ||
134 | hdpu_slot_id = 0; | 129 | hdpu_slot_id = 0; |
135 | hdpu_chassis_id = 0; | 130 | hdpu_chassis_id = 0; |
diff --git a/drivers/misc/ibmasm/command.c b/drivers/misc/ibmasm/command.c index 1a0e7978226a..276d3fb68094 100644 --- a/drivers/misc/ibmasm/command.c +++ b/drivers/misc/ibmasm/command.c | |||
@@ -96,7 +96,7 @@ static inline void do_exec_command(struct service_processor *sp) | |||
96 | { | 96 | { |
97 | char tsbuf[32]; | 97 | char tsbuf[32]; |
98 | 98 | ||
99 | dbg("%s:%d at %s\n", __FUNCTION__, __LINE__, get_timestamp(tsbuf)); | 99 | dbg("%s:%d at %s\n", __func__, __LINE__, get_timestamp(tsbuf)); |
100 | 100 | ||
101 | if (ibmasm_send_i2o_message(sp)) { | 101 | if (ibmasm_send_i2o_message(sp)) { |
102 | sp->current_command->status = IBMASM_CMD_FAILED; | 102 | sp->current_command->status = IBMASM_CMD_FAILED; |
@@ -119,7 +119,7 @@ void ibmasm_exec_command(struct service_processor *sp, struct command *cmd) | |||
119 | unsigned long flags; | 119 | unsigned long flags; |
120 | char tsbuf[32]; | 120 | char tsbuf[32]; |
121 | 121 | ||
122 | dbg("%s:%d at %s\n", __FUNCTION__, __LINE__, get_timestamp(tsbuf)); | 122 | dbg("%s:%d at %s\n", __func__, __LINE__, get_timestamp(tsbuf)); |
123 | 123 | ||
124 | spin_lock_irqsave(&sp->lock, flags); | 124 | spin_lock_irqsave(&sp->lock, flags); |
125 | 125 | ||
@@ -139,7 +139,7 @@ static void exec_next_command(struct service_processor *sp) | |||
139 | unsigned long flags; | 139 | unsigned long flags; |
140 | char tsbuf[32]; | 140 | char tsbuf[32]; |
141 | 141 | ||
142 | dbg("%s:%d at %s\n", __FUNCTION__, __LINE__, get_timestamp(tsbuf)); | 142 | dbg("%s:%d at %s\n", __func__, __LINE__, get_timestamp(tsbuf)); |
143 | 143 | ||
144 | spin_lock_irqsave(&sp->lock, flags); | 144 | spin_lock_irqsave(&sp->lock, flags); |
145 | sp->current_command = dequeue_command(sp); | 145 | sp->current_command = dequeue_command(sp); |
diff --git a/drivers/misc/ibmasm/heartbeat.c b/drivers/misc/ibmasm/heartbeat.c index 3036e785b3e4..1bc4306572a4 100644 --- a/drivers/misc/ibmasm/heartbeat.c +++ b/drivers/misc/ibmasm/heartbeat.c | |||
@@ -75,9 +75,9 @@ void ibmasm_heartbeat_exit(struct service_processor *sp) | |||
75 | { | 75 | { |
76 | char tsbuf[32]; | 76 | char tsbuf[32]; |
77 | 77 | ||
78 | dbg("%s:%d at %s\n", __FUNCTION__, __LINE__, get_timestamp(tsbuf)); | 78 | dbg("%s:%d at %s\n", __func__, __LINE__, get_timestamp(tsbuf)); |
79 | ibmasm_wait_for_response(sp->heartbeat, IBMASM_CMD_TIMEOUT_NORMAL); | 79 | ibmasm_wait_for_response(sp->heartbeat, IBMASM_CMD_TIMEOUT_NORMAL); |
80 | dbg("%s:%d at %s\n", __FUNCTION__, __LINE__, get_timestamp(tsbuf)); | 80 | dbg("%s:%d at %s\n", __func__, __LINE__, get_timestamp(tsbuf)); |
81 | suspend_heartbeats = 1; | 81 | suspend_heartbeats = 1; |
82 | command_put(sp->heartbeat); | 82 | command_put(sp->heartbeat); |
83 | } | 83 | } |
@@ -88,7 +88,7 @@ void ibmasm_receive_heartbeat(struct service_processor *sp, void *message, size | |||
88 | struct dot_command_header *header = (struct dot_command_header *)cmd->buffer; | 88 | struct dot_command_header *header = (struct dot_command_header *)cmd->buffer; |
89 | char tsbuf[32]; | 89 | char tsbuf[32]; |
90 | 90 | ||
91 | dbg("%s:%d at %s\n", __FUNCTION__, __LINE__, get_timestamp(tsbuf)); | 91 | dbg("%s:%d at %s\n", __func__, __LINE__, get_timestamp(tsbuf)); |
92 | if (suspend_heartbeats) | 92 | if (suspend_heartbeats) |
93 | return; | 93 | return; |
94 | 94 | ||
diff --git a/drivers/misc/intel_menlow.c b/drivers/misc/intel_menlow.c index 5bb8816c9126..80a136352408 100644 --- a/drivers/misc/intel_menlow.c +++ b/drivers/misc/intel_menlow.c | |||
@@ -179,14 +179,22 @@ static int intel_menlow_memory_add(struct acpi_device *device) | |||
179 | result = sysfs_create_link(&device->dev.kobj, | 179 | result = sysfs_create_link(&device->dev.kobj, |
180 | &cdev->device.kobj, "thermal_cooling"); | 180 | &cdev->device.kobj, "thermal_cooling"); |
181 | if (result) | 181 | if (result) |
182 | printk(KERN_ERR PREFIX "Create sysfs link\n"); | 182 | goto unregister; |
183 | |||
183 | result = sysfs_create_link(&cdev->device.kobj, | 184 | result = sysfs_create_link(&cdev->device.kobj, |
184 | &device->dev.kobj, "device"); | 185 | &device->dev.kobj, "device"); |
185 | if (result) | 186 | if (result) { |
186 | printk(KERN_ERR PREFIX "Create sysfs link\n"); | 187 | sysfs_remove_link(&device->dev.kobj, "thermal_cooling"); |
188 | goto unregister; | ||
189 | } | ||
187 | 190 | ||
188 | end: | 191 | end: |
189 | return result; | 192 | return result; |
193 | |||
194 | unregister: | ||
195 | thermal_cooling_device_unregister(cdev); | ||
196 | return result; | ||
197 | |||
190 | } | 198 | } |
191 | 199 | ||
192 | static int intel_menlow_memory_remove(struct acpi_device *device, int type) | 200 | static int intel_menlow_memory_remove(struct acpi_device *device, int type) |
diff --git a/drivers/misc/ioc4.c b/drivers/misc/ioc4.c index 05172d2613d6..6f76573e7c8a 100644 --- a/drivers/misc/ioc4.c +++ b/drivers/misc/ioc4.c | |||
@@ -75,7 +75,7 @@ ioc4_register_submodule(struct ioc4_submodule *is) | |||
75 | printk(KERN_WARNING | 75 | printk(KERN_WARNING |
76 | "%s: IOC4 submodule %s probe failed " | 76 | "%s: IOC4 submodule %s probe failed " |
77 | "for pci_dev %s", | 77 | "for pci_dev %s", |
78 | __FUNCTION__, module_name(is->is_owner), | 78 | __func__, module_name(is->is_owner), |
79 | pci_name(idd->idd_pdev)); | 79 | pci_name(idd->idd_pdev)); |
80 | } | 80 | } |
81 | } | 81 | } |
@@ -102,7 +102,7 @@ ioc4_unregister_submodule(struct ioc4_submodule *is) | |||
102 | printk(KERN_WARNING | 102 | printk(KERN_WARNING |
103 | "%s: IOC4 submodule %s remove failed " | 103 | "%s: IOC4 submodule %s remove failed " |
104 | "for pci_dev %s.\n", | 104 | "for pci_dev %s.\n", |
105 | __FUNCTION__, module_name(is->is_owner), | 105 | __func__, module_name(is->is_owner), |
106 | pci_name(idd->idd_pdev)); | 106 | pci_name(idd->idd_pdev)); |
107 | } | 107 | } |
108 | } | 108 | } |
@@ -282,7 +282,7 @@ ioc4_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id) | |||
282 | if ((ret = pci_enable_device(pdev))) { | 282 | if ((ret = pci_enable_device(pdev))) { |
283 | printk(KERN_WARNING | 283 | printk(KERN_WARNING |
284 | "%s: Failed to enable IOC4 device for pci_dev %s.\n", | 284 | "%s: Failed to enable IOC4 device for pci_dev %s.\n", |
285 | __FUNCTION__, pci_name(pdev)); | 285 | __func__, pci_name(pdev)); |
286 | goto out; | 286 | goto out; |
287 | } | 287 | } |
288 | pci_set_master(pdev); | 288 | pci_set_master(pdev); |
@@ -292,7 +292,7 @@ ioc4_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id) | |||
292 | if (!idd) { | 292 | if (!idd) { |
293 | printk(KERN_WARNING | 293 | printk(KERN_WARNING |
294 | "%s: Failed to allocate IOC4 data for pci_dev %s.\n", | 294 | "%s: Failed to allocate IOC4 data for pci_dev %s.\n", |
295 | __FUNCTION__, pci_name(pdev)); | 295 | __func__, pci_name(pdev)); |
296 | ret = -ENODEV; | 296 | ret = -ENODEV; |
297 | goto out_idd; | 297 | goto out_idd; |
298 | } | 298 | } |
@@ -307,7 +307,7 @@ ioc4_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id) | |||
307 | printk(KERN_WARNING | 307 | printk(KERN_WARNING |
308 | "%s: Unable to find IOC4 misc resource " | 308 | "%s: Unable to find IOC4 misc resource " |
309 | "for pci_dev %s.\n", | 309 | "for pci_dev %s.\n", |
310 | __FUNCTION__, pci_name(idd->idd_pdev)); | 310 | __func__, pci_name(idd->idd_pdev)); |
311 | ret = -ENODEV; | 311 | ret = -ENODEV; |
312 | goto out_pci; | 312 | goto out_pci; |
313 | } | 313 | } |
@@ -316,7 +316,7 @@ ioc4_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id) | |||
316 | printk(KERN_WARNING | 316 | printk(KERN_WARNING |
317 | "%s: Unable to request IOC4 misc region " | 317 | "%s: Unable to request IOC4 misc region " |
318 | "for pci_dev %s.\n", | 318 | "for pci_dev %s.\n", |
319 | __FUNCTION__, pci_name(idd->idd_pdev)); | 319 | __func__, pci_name(idd->idd_pdev)); |
320 | ret = -ENODEV; | 320 | ret = -ENODEV; |
321 | goto out_pci; | 321 | goto out_pci; |
322 | } | 322 | } |
@@ -326,7 +326,7 @@ ioc4_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id) | |||
326 | printk(KERN_WARNING | 326 | printk(KERN_WARNING |
327 | "%s: Unable to remap IOC4 misc region " | 327 | "%s: Unable to remap IOC4 misc region " |
328 | "for pci_dev %s.\n", | 328 | "for pci_dev %s.\n", |
329 | __FUNCTION__, pci_name(idd->idd_pdev)); | 329 | __func__, pci_name(idd->idd_pdev)); |
330 | ret = -ENODEV; | 330 | ret = -ENODEV; |
331 | goto out_misc_region; | 331 | goto out_misc_region; |
332 | } | 332 | } |
@@ -372,7 +372,7 @@ ioc4_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id) | |||
372 | printk(KERN_WARNING | 372 | printk(KERN_WARNING |
373 | "%s: IOC4 submodule 0x%s probe failed " | 373 | "%s: IOC4 submodule 0x%s probe failed " |
374 | "for pci_dev %s.\n", | 374 | "for pci_dev %s.\n", |
375 | __FUNCTION__, module_name(is->is_owner), | 375 | __func__, module_name(is->is_owner), |
376 | pci_name(idd->idd_pdev)); | 376 | pci_name(idd->idd_pdev)); |
377 | } | 377 | } |
378 | } | 378 | } |
@@ -406,7 +406,7 @@ ioc4_remove(struct pci_dev *pdev) | |||
406 | printk(KERN_WARNING | 406 | printk(KERN_WARNING |
407 | "%s: IOC4 submodule 0x%s remove failed " | 407 | "%s: IOC4 submodule 0x%s remove failed " |
408 | "for pci_dev %s.\n", | 408 | "for pci_dev %s.\n", |
409 | __FUNCTION__, module_name(is->is_owner), | 409 | __func__, module_name(is->is_owner), |
410 | pci_name(idd->idd_pdev)); | 410 | pci_name(idd->idd_pdev)); |
411 | } | 411 | } |
412 | } | 412 | } |
@@ -418,7 +418,7 @@ ioc4_remove(struct pci_dev *pdev) | |||
418 | printk(KERN_WARNING | 418 | printk(KERN_WARNING |
419 | "%s: Unable to get IOC4 misc mapping for pci_dev %s. " | 419 | "%s: Unable to get IOC4 misc mapping for pci_dev %s. " |
420 | "Device removal may be incomplete.\n", | 420 | "Device removal may be incomplete.\n", |
421 | __FUNCTION__, pci_name(idd->idd_pdev)); | 421 | __func__, pci_name(idd->idd_pdev)); |
422 | } | 422 | } |
423 | release_mem_region(idd->idd_bar0, sizeof(struct ioc4_misc_regs)); | 423 | release_mem_region(idd->idd_bar0, sizeof(struct ioc4_misc_regs)); |
424 | 424 | ||
diff --git a/drivers/misc/kgdbts.c b/drivers/misc/kgdbts.c index 6d6286c4eeac..30a1af857c7a 100644 --- a/drivers/misc/kgdbts.c +++ b/drivers/misc/kgdbts.c | |||
@@ -132,7 +132,7 @@ static int send_ack; | |||
132 | static int final_ack; | 132 | static int final_ack; |
133 | static int hw_break_val; | 133 | static int hw_break_val; |
134 | static int hw_break_val2; | 134 | static int hw_break_val2; |
135 | #if defined(CONFIG_ARM) || defined(CONFIG_MIPS) | 135 | #if defined(CONFIG_ARM) || defined(CONFIG_MIPS) || defined(CONFIG_SPARC) |
136 | static int arch_needs_sstep_emulation = 1; | 136 | static int arch_needs_sstep_emulation = 1; |
137 | #else | 137 | #else |
138 | static int arch_needs_sstep_emulation; | 138 | static int arch_needs_sstep_emulation; |
diff --git a/drivers/misc/phantom.c b/drivers/misc/phantom.c index 7fa61e907e1c..71d1c84e2fa8 100644 --- a/drivers/misc/phantom.c +++ b/drivers/misc/phantom.c | |||
@@ -12,6 +12,7 @@ | |||
12 | * or alternatively, you might use OpenHaptics provided by Sensable. | 12 | * or alternatively, you might use OpenHaptics provided by Sensable. |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/compat.h> | ||
15 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
16 | #include <linux/module.h> | 17 | #include <linux/module.h> |
17 | #include <linux/device.h> | 18 | #include <linux/device.h> |
@@ -91,11 +92,8 @@ static long phantom_ioctl(struct file *file, unsigned int cmd, | |||
91 | unsigned long flags; | 92 | unsigned long flags; |
92 | unsigned int i; | 93 | unsigned int i; |
93 | 94 | ||
94 | if (_IOC_TYPE(cmd) != PH_IOC_MAGIC || | ||
95 | _IOC_NR(cmd) > PH_IOC_MAXNR) | ||
96 | return -ENOTTY; | ||
97 | |||
98 | switch (cmd) { | 95 | switch (cmd) { |
96 | case PHN_SETREG: | ||
99 | case PHN_SET_REG: | 97 | case PHN_SET_REG: |
100 | if (copy_from_user(&r, argp, sizeof(r))) | 98 | if (copy_from_user(&r, argp, sizeof(r))) |
101 | return -EFAULT; | 99 | return -EFAULT; |
@@ -126,6 +124,7 @@ static long phantom_ioctl(struct file *file, unsigned int cmd, | |||
126 | phantom_status(dev, dev->status & ~PHB_RUNNING); | 124 | phantom_status(dev, dev->status & ~PHB_RUNNING); |
127 | spin_unlock_irqrestore(&dev->regs_lock, flags); | 125 | spin_unlock_irqrestore(&dev->regs_lock, flags); |
128 | break; | 126 | break; |
127 | case PHN_SETREGS: | ||
129 | case PHN_SET_REGS: | 128 | case PHN_SET_REGS: |
130 | if (copy_from_user(&rs, argp, sizeof(rs))) | 129 | if (copy_from_user(&rs, argp, sizeof(rs))) |
131 | return -EFAULT; | 130 | return -EFAULT; |
@@ -143,6 +142,7 @@ static long phantom_ioctl(struct file *file, unsigned int cmd, | |||
143 | } | 142 | } |
144 | spin_unlock_irqrestore(&dev->regs_lock, flags); | 143 | spin_unlock_irqrestore(&dev->regs_lock, flags); |
145 | break; | 144 | break; |
145 | case PHN_GETREG: | ||
146 | case PHN_GET_REG: | 146 | case PHN_GET_REG: |
147 | if (copy_from_user(&r, argp, sizeof(r))) | 147 | if (copy_from_user(&r, argp, sizeof(r))) |
148 | return -EFAULT; | 148 | return -EFAULT; |
@@ -155,6 +155,7 @@ static long phantom_ioctl(struct file *file, unsigned int cmd, | |||
155 | if (copy_to_user(argp, &r, sizeof(r))) | 155 | if (copy_to_user(argp, &r, sizeof(r))) |
156 | return -EFAULT; | 156 | return -EFAULT; |
157 | break; | 157 | break; |
158 | case PHN_GETREGS: | ||
158 | case PHN_GET_REGS: { | 159 | case PHN_GET_REGS: { |
159 | u32 m; | 160 | u32 m; |
160 | 161 | ||
@@ -168,6 +169,7 @@ static long phantom_ioctl(struct file *file, unsigned int cmd, | |||
168 | for (i = 0; i < m; i++) | 169 | for (i = 0; i < m; i++) |
169 | if (rs.mask & BIT(i)) | 170 | if (rs.mask & BIT(i)) |
170 | rs.values[i] = ioread32(dev->iaddr + i); | 171 | rs.values[i] = ioread32(dev->iaddr + i); |
172 | atomic_set(&dev->counter, 0); | ||
171 | spin_unlock_irqrestore(&dev->regs_lock, flags); | 173 | spin_unlock_irqrestore(&dev->regs_lock, flags); |
172 | 174 | ||
173 | if (copy_to_user(argp, &rs, sizeof(rs))) | 175 | if (copy_to_user(argp, &rs, sizeof(rs))) |
@@ -191,6 +193,20 @@ static long phantom_ioctl(struct file *file, unsigned int cmd, | |||
191 | return 0; | 193 | return 0; |
192 | } | 194 | } |
193 | 195 | ||
196 | #ifdef CONFIG_COMPAT | ||
197 | static long phantom_compat_ioctl(struct file *filp, unsigned int cmd, | ||
198 | unsigned long arg) | ||
199 | { | ||
200 | if (_IOC_NR(cmd) <= 3 && _IOC_SIZE(cmd) == sizeof(compat_uptr_t)) { | ||
201 | cmd &= ~(_IOC_SIZEMASK << _IOC_SIZESHIFT); | ||
202 | cmd |= sizeof(void *) << _IOC_SIZESHIFT; | ||
203 | } | ||
204 | return phantom_ioctl(filp, cmd, (unsigned long)compat_ptr(arg)); | ||
205 | } | ||
206 | #else | ||
207 | #define phantom_compat_ioctl NULL | ||
208 | #endif | ||
209 | |||
194 | static int phantom_open(struct inode *inode, struct file *file) | 210 | static int phantom_open(struct inode *inode, struct file *file) |
195 | { | 211 | { |
196 | struct phantom_device *dev = container_of(inode->i_cdev, | 212 | struct phantom_device *dev = container_of(inode->i_cdev, |
@@ -239,11 +255,12 @@ static unsigned int phantom_poll(struct file *file, poll_table *wait) | |||
239 | 255 | ||
240 | pr_debug("phantom_poll: %d\n", atomic_read(&dev->counter)); | 256 | pr_debug("phantom_poll: %d\n", atomic_read(&dev->counter)); |
241 | poll_wait(file, &dev->wait, wait); | 257 | poll_wait(file, &dev->wait, wait); |
242 | if (atomic_read(&dev->counter)) { | 258 | |
259 | if (!(dev->status & PHB_RUNNING)) | ||
260 | mask = POLLERR; | ||
261 | else if (atomic_read(&dev->counter)) | ||
243 | mask = POLLIN | POLLRDNORM; | 262 | mask = POLLIN | POLLRDNORM; |
244 | atomic_dec(&dev->counter); | 263 | |
245 | } else if ((dev->status & PHB_RUNNING) == 0) | ||
246 | mask = POLLIN | POLLRDNORM | POLLERR; | ||
247 | pr_debug("phantom_poll end: %x/%d\n", mask, atomic_read(&dev->counter)); | 264 | pr_debug("phantom_poll end: %x/%d\n", mask, atomic_read(&dev->counter)); |
248 | 265 | ||
249 | return mask; | 266 | return mask; |
@@ -253,6 +270,7 @@ static struct file_operations phantom_file_ops = { | |||
253 | .open = phantom_open, | 270 | .open = phantom_open, |
254 | .release = phantom_release, | 271 | .release = phantom_release, |
255 | .unlocked_ioctl = phantom_ioctl, | 272 | .unlocked_ioctl = phantom_ioctl, |
273 | .compat_ioctl = phantom_compat_ioctl, | ||
256 | .poll = phantom_poll, | 274 | .poll = phantom_poll, |
257 | }; | 275 | }; |
258 | 276 | ||
diff --git a/drivers/misc/sgi-xp/xpc_partition.c b/drivers/misc/sgi-xp/xpc_partition.c index 27e200ec5826..acd3fd4285d7 100644 --- a/drivers/misc/sgi-xp/xpc_partition.c +++ b/drivers/misc/sgi-xp/xpc_partition.c | |||
@@ -211,7 +211,7 @@ xpc_rsvd_page_init(void) | |||
211 | */ | 211 | */ |
212 | amos_page = xpc_vars->amos_page; | 212 | amos_page = xpc_vars->amos_page; |
213 | if (amos_page == NULL) { | 213 | if (amos_page == NULL) { |
214 | amos_page = (AMO_t *)TO_AMO(uncached_alloc_page(0)); | 214 | amos_page = (AMO_t *)TO_AMO(uncached_alloc_page(0, 1)); |
215 | if (amos_page == NULL) { | 215 | if (amos_page == NULL) { |
216 | dev_err(xpc_part, "can't allocate page of AMOs\n"); | 216 | dev_err(xpc_part, "can't allocate page of AMOs\n"); |
217 | return NULL; | 217 | return NULL; |
@@ -230,7 +230,7 @@ xpc_rsvd_page_init(void) | |||
230 | dev_err(xpc_part, "can't change memory " | 230 | dev_err(xpc_part, "can't change memory " |
231 | "protections\n"); | 231 | "protections\n"); |
232 | uncached_free_page(__IA64_UNCACHED_OFFSET | | 232 | uncached_free_page(__IA64_UNCACHED_OFFSET | |
233 | TO_PHYS((u64)amos_page)); | 233 | TO_PHYS((u64)amos_page), 1); |
234 | return NULL; | 234 | return NULL; |
235 | } | 235 | } |
236 | } | 236 | } |
diff --git a/drivers/misc/sony-laptop.c b/drivers/misc/sony-laptop.c index 02ff3d19b1cc..00e48e2a9c11 100644 --- a/drivers/misc/sony-laptop.c +++ b/drivers/misc/sony-laptop.c | |||
@@ -961,7 +961,7 @@ static int sony_nc_resume(struct acpi_device *device) | |||
961 | ret = acpi_callsetfunc(sony_nc_acpi_handle, *item->acpiset, | 961 | ret = acpi_callsetfunc(sony_nc_acpi_handle, *item->acpiset, |
962 | item->value, NULL); | 962 | item->value, NULL); |
963 | if (ret < 0) { | 963 | if (ret < 0) { |
964 | printk("%s: %d\n", __FUNCTION__, ret); | 964 | printk("%s: %d\n", __func__, ret); |
965 | break; | 965 | break; |
966 | } | 966 | } |
967 | } | 967 | } |
@@ -1453,7 +1453,7 @@ static struct sonypi_eventtypes type4_events[] = { | |||
1453 | udelay(1); \ | 1453 | udelay(1); \ |
1454 | if (!n) \ | 1454 | if (!n) \ |
1455 | dprintk("command failed at %s : %s (line %d)\n", \ | 1455 | dprintk("command failed at %s : %s (line %d)\n", \ |
1456 | __FILE__, __FUNCTION__, __LINE__); \ | 1456 | __FILE__, __func__, __LINE__); \ |
1457 | } | 1457 | } |
1458 | 1458 | ||
1459 | static u8 sony_pic_call1(u8 dev) | 1459 | static u8 sony_pic_call1(u8 dev) |