aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/char/ipmi/ipmi_si_intf.c2
-rw-r--r--drivers/edac/edac_mc.c45
-rw-r--r--drivers/ide/pci/amd74xx.c7
-rw-r--r--drivers/isdn/hysdn/hysdn_sched.c19
-rw-r--r--drivers/md/md.c2
-rw-r--r--drivers/misc/lkdtm.c24
-rw-r--r--drivers/spi/spi.c1
7 files changed, 52 insertions, 48 deletions
diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c
index e5cfb1fa47d..157fa81a264 100644
--- a/drivers/char/ipmi/ipmi_si_intf.c
+++ b/drivers/char/ipmi/ipmi_si_intf.c
@@ -1867,7 +1867,7 @@ static int ipmi_pci_resume(struct pci_dev *pdev)
1867 1867
1868static struct pci_device_id ipmi_pci_devices[] = { 1868static struct pci_device_id ipmi_pci_devices[] = {
1869 { PCI_DEVICE(PCI_HP_VENDOR_ID, PCI_MMC_DEVICE_ID) }, 1869 { PCI_DEVICE(PCI_HP_VENDOR_ID, PCI_MMC_DEVICE_ID) },
1870 { PCI_DEVICE_CLASS(PCI_ERMC_CLASSCODE, PCI_ERMC_CLASSCODE) } 1870 { PCI_DEVICE_CLASS(PCI_ERMC_CLASSCODE, PCI_ERMC_CLASSCODE_MASK) }
1871}; 1871};
1872MODULE_DEVICE_TABLE(pci, ipmi_pci_devices); 1872MODULE_DEVICE_TABLE(pci, ipmi_pci_devices);
1873 1873
diff --git a/drivers/edac/edac_mc.c b/drivers/edac/edac_mc.c
index 4bde30bb3be..75e9e38330f 100644
--- a/drivers/edac/edac_mc.c
+++ b/drivers/edac/edac_mc.c
@@ -230,34 +230,43 @@ static struct kobj_type ktype_memctrl = {
230 */ 230 */
231static int edac_sysfs_memctrl_setup(void) 231static int edac_sysfs_memctrl_setup(void)
232{ 232{
233 int err=0; 233 int err = 0;
234 234
235 debugf1("%s()\n", __func__); 235 debugf1("%s()\n", __func__);
236 236
237 /* create the /sys/devices/system/edac directory */ 237 /* create the /sys/devices/system/edac directory */
238 err = sysdev_class_register(&edac_class); 238 err = sysdev_class_register(&edac_class);
239 239
240 if (!err) { 240 if (err) {
241 /* Init the MC's kobject */ 241 debugf1("%s() error=%d\n", __func__, err);
242 memset(&edac_memctrl_kobj, 0, sizeof (edac_memctrl_kobj)); 242 return err;
243 edac_memctrl_kobj.parent = &edac_class.kset.kobj; 243 }
244 edac_memctrl_kobj.ktype = &ktype_memctrl;
245 244
246 /* generate sysfs "..../edac/mc" */ 245 /* Init the MC's kobject */
247 err = kobject_set_name(&edac_memctrl_kobj,"mc"); 246 memset(&edac_memctrl_kobj, 0, sizeof (edac_memctrl_kobj));
247 edac_memctrl_kobj.parent = &edac_class.kset.kobj;
248 edac_memctrl_kobj.ktype = &ktype_memctrl;
248 249
249 if (!err) { 250 /* generate sysfs "..../edac/mc" */
250 /* FIXME: maybe new sysdev_create_subdir() */ 251 err = kobject_set_name(&edac_memctrl_kobj,"mc");
251 err = kobject_register(&edac_memctrl_kobj);
252 252
253 if (err) 253 if (err)
254 debugf1("Failed to register '.../edac/mc'\n"); 254 goto fail;
255 else 255
256 debugf1("Registered '.../edac/mc' kobject\n"); 256 /* FIXME: maybe new sysdev_create_subdir() */
257 } 257 err = kobject_register(&edac_memctrl_kobj);
258 } else 258
259 debugf1("%s() error=%d\n", __func__, err); 259 if (err) {
260 debugf1("Failed to register '.../edac/mc'\n");
261 goto fail;
262 }
260 263
264 debugf1("Registered '.../edac/mc' kobject\n");
265
266 return 0;
267
268fail:
269 sysdev_class_unregister(&edac_class);
261 return err; 270 return err;
262} 271}
263 272
diff --git a/drivers/ide/pci/amd74xx.c b/drivers/ide/pci/amd74xx.c
index 2b0ea8b6608..753fe0e2145 100644
--- a/drivers/ide/pci/amd74xx.c
+++ b/drivers/ide/pci/amd74xx.c
@@ -75,6 +75,7 @@ static struct amd_ide_chip {
75 { PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_IDE, 0x50, AMD_UDMA_133 }, 75 { PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_IDE, 0x50, AMD_UDMA_133 },
76 { PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_IDE, 0x50, AMD_UDMA_133 }, 76 { PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_IDE, 0x50, AMD_UDMA_133 },
77 { PCI_DEVICE_ID_NVIDIA_NFORCE_MCP65_IDE, 0x50, AMD_UDMA_133 }, 77 { PCI_DEVICE_ID_NVIDIA_NFORCE_MCP65_IDE, 0x50, AMD_UDMA_133 },
78 { PCI_DEVICE_ID_NVIDIA_NFORCE_MCP67_IDE, 0x50, AMD_UDMA_133 },
78 { PCI_DEVICE_ID_AMD_CS5536_IDE, 0x40, AMD_UDMA_100 }, 79 { PCI_DEVICE_ID_AMD_CS5536_IDE, 0x40, AMD_UDMA_100 },
79 { 0 } 80 { 0 }
80}; 81};
@@ -491,7 +492,8 @@ static ide_pci_device_t amd74xx_chipsets[] __devinitdata = {
491 /* 16 */ DECLARE_NV_DEV("NFORCE-MCP55"), 492 /* 16 */ DECLARE_NV_DEV("NFORCE-MCP55"),
492 /* 17 */ DECLARE_NV_DEV("NFORCE-MCP61"), 493 /* 17 */ DECLARE_NV_DEV("NFORCE-MCP61"),
493 /* 18 */ DECLARE_NV_DEV("NFORCE-MCP65"), 494 /* 18 */ DECLARE_NV_DEV("NFORCE-MCP65"),
494 /* 19 */ DECLARE_AMD_DEV("AMD5536"), 495 /* 19 */ DECLARE_NV_DEV("NFORCE-MCP67"),
496 /* 20 */ DECLARE_AMD_DEV("AMD5536"),
495}; 497};
496 498
497static int __devinit amd74xx_probe(struct pci_dev *dev, const struct pci_device_id *id) 499static int __devinit amd74xx_probe(struct pci_dev *dev, const struct pci_device_id *id)
@@ -530,7 +532,8 @@ static struct pci_device_id amd74xx_pci_tbl[] = {
530 { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 16 }, 532 { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 16 },
531 { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 17 }, 533 { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 17 },
532 { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP65_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 18 }, 534 { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP65_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 18 },
533 { PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_CS5536_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 19 }, 535 { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP67_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 19 },
536 { PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_CS5536_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 20 },
534 { 0, }, 537 { 0, },
535}; 538};
536MODULE_DEVICE_TABLE(pci, amd74xx_pci_tbl); 539MODULE_DEVICE_TABLE(pci, amd74xx_pci_tbl);
diff --git a/drivers/isdn/hysdn/hysdn_sched.c b/drivers/isdn/hysdn/hysdn_sched.c
index 1fadf0133e9..18758772b74 100644
--- a/drivers/isdn/hysdn/hysdn_sched.c
+++ b/drivers/isdn/hysdn/hysdn_sched.c
@@ -155,21 +155,17 @@ hysdn_tx_cfgline(hysdn_card *card, unsigned char *line, unsigned short chan)
155 if (card->debug_flags & LOG_SCHED_ASYN) 155 if (card->debug_flags & LOG_SCHED_ASYN)
156 hysdn_addlog(card, "async tx-cfg chan=%d len=%d", chan, strlen(line) + 1); 156 hysdn_addlog(card, "async tx-cfg chan=%d len=%d", chan, strlen(line) + 1);
157 157
158 spin_lock_irqsave(&card->hysdn_lock, flags);
159 while (card->async_busy) { 158 while (card->async_busy) {
160 sti();
161 159
162 if (card->debug_flags & LOG_SCHED_ASYN) 160 if (card->debug_flags & LOG_SCHED_ASYN)
163 hysdn_addlog(card, "async tx-cfg delayed"); 161 hysdn_addlog(card, "async tx-cfg delayed");
164 162
165 msleep_interruptible(20); /* Timeout 20ms */ 163 msleep_interruptible(20); /* Timeout 20ms */
166 if (!--cnt) { 164 if (!--cnt)
167 spin_unlock_irqrestore(&card->hysdn_lock, flags);
168 return (-ERR_ASYNC_TIME); /* timed out */ 165 return (-ERR_ASYNC_TIME); /* timed out */
169 }
170 cli();
171 } /* wait for buffer to become free */ 166 } /* wait for buffer to become free */
172 167
168 spin_lock_irqsave(&card->hysdn_lock, flags);
173 strcpy(card->async_data, line); 169 strcpy(card->async_data, line);
174 card->async_len = strlen(line) + 1; 170 card->async_len = strlen(line) + 1;
175 card->async_channel = chan; 171 card->async_channel = chan;
@@ -177,30 +173,23 @@ hysdn_tx_cfgline(hysdn_card *card, unsigned char *line, unsigned short chan)
177 173
178 /* now queue the task */ 174 /* now queue the task */
179 schedule_work(&card->irq_queue); 175 schedule_work(&card->irq_queue);
180 sti(); 176 spin_unlock_irqrestore(&card->hysdn_lock, flags);
181 177
182 if (card->debug_flags & LOG_SCHED_ASYN) 178 if (card->debug_flags & LOG_SCHED_ASYN)
183 hysdn_addlog(card, "async tx-cfg data queued"); 179 hysdn_addlog(card, "async tx-cfg data queued");
184 180
185 cnt++; /* short delay */ 181 cnt++; /* short delay */
186 cli();
187 182
188 while (card->async_busy) { 183 while (card->async_busy) {
189 sti();
190 184
191 if (card->debug_flags & LOG_SCHED_ASYN) 185 if (card->debug_flags & LOG_SCHED_ASYN)
192 hysdn_addlog(card, "async tx-cfg waiting for tx-ready"); 186 hysdn_addlog(card, "async tx-cfg waiting for tx-ready");
193 187
194 msleep_interruptible(20); /* Timeout 20ms */ 188 msleep_interruptible(20); /* Timeout 20ms */
195 if (!--cnt) { 189 if (!--cnt)
196 spin_unlock_irqrestore(&card->hysdn_lock, flags);
197 return (-ERR_ASYNC_TIME); /* timed out */ 190 return (-ERR_ASYNC_TIME); /* timed out */
198 }
199 cli();
200 } /* wait for buffer to become free again */ 191 } /* wait for buffer to become free again */
201 192
202 spin_unlock_irqrestore(&card->hysdn_lock, flags);
203
204 if (card->debug_flags & LOG_SCHED_ASYN) 193 if (card->debug_flags & LOG_SCHED_ASYN)
205 hysdn_addlog(card, "async tx-cfg data send"); 194 hysdn_addlog(card, "async tx-cfg data send");
206 195
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 50ab4a936e3..d1113560440 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -3200,6 +3200,7 @@ static int do_md_run(mddev_t * mddev)
3200 3200
3201 mddev->changed = 1; 3201 mddev->changed = 1;
3202 md_new_event(mddev); 3202 md_new_event(mddev);
3203 kobject_uevent(&mddev->gendisk->kobj, KOBJ_ONLINE);
3203 return 0; 3204 return 0;
3204} 3205}
3205 3206
@@ -3313,6 +3314,7 @@ static int do_md_stop(mddev_t * mddev, int mode)
3313 3314
3314 module_put(mddev->pers->owner); 3315 module_put(mddev->pers->owner);
3315 mddev->pers = NULL; 3316 mddev->pers = NULL;
3317 kobject_uevent(&mddev->gendisk->kobj, KOBJ_OFFLINE);
3316 if (mddev->ro) 3318 if (mddev->ro)
3317 mddev->ro = 0; 3319 mddev->ro = 0;
3318 } 3320 }
diff --git a/drivers/misc/lkdtm.c b/drivers/misc/lkdtm.c
index bbdba7b37e1..46a9c35943b 100644
--- a/drivers/misc/lkdtm.c
+++ b/drivers/misc/lkdtm.c
@@ -44,12 +44,14 @@
44 */ 44 */
45 45
46#include <linux/kernel.h> 46#include <linux/kernel.h>
47#include <linux/fs.h>
47#include <linux/module.h> 48#include <linux/module.h>
49#include <linux/buffer_head.h>
48#include <linux/kprobes.h> 50#include <linux/kprobes.h>
49#include <linux/kallsyms.h> 51#include <linux/list.h>
50#include <linux/init.h> 52#include <linux/init.h>
51#include <linux/irq.h>
52#include <linux/interrupt.h> 53#include <linux/interrupt.h>
54#include <linux/hrtimer.h>
53#include <scsi/scsi_cmnd.h> 55#include <scsi/scsi_cmnd.h>
54 56
55#ifdef CONFIG_IDE 57#ifdef CONFIG_IDE
@@ -116,16 +118,16 @@ static enum ctype cptype = NONE;
116static int count = DEFAULT_COUNT; 118static int count = DEFAULT_COUNT;
117 119
118module_param(recur_count, int, 0644); 120module_param(recur_count, int, 0644);
119MODULE_PARM_DESC(recur_count, "Recurcion level for the stack overflow test,\ 121MODULE_PARM_DESC(recur_count, " Recursion level for the stack overflow test, "\
120 default is 10"); 122 "default is 10");
121module_param(cpoint_name, charp, 0644); 123module_param(cpoint_name, charp, 0644);
122MODULE_PARM_DESC(cpoint_name, "Crash Point, where kernel is to be crashed"); 124MODULE_PARM_DESC(cpoint_name, " Crash Point, where kernel is to be crashed");
123module_param(cpoint_type, charp, 06444); 125module_param(cpoint_type, charp, 0644);
124MODULE_PARM_DESC(cpoint_type, "Crash Point Type, action to be taken on\ 126MODULE_PARM_DESC(cpoint_type, " Crash Point Type, action to be taken on "\
125 hitting the crash point"); 127 "hitting the crash point");
126module_param(cpoint_count, int, 06444); 128module_param(cpoint_count, int, 0644);
127MODULE_PARM_DESC(cpoint_count, "Crash Point Count, number of times the \ 129MODULE_PARM_DESC(cpoint_count, " Crash Point Count, number of times the "\
128 crash point is to be hit to trigger action"); 130 "crash point is to be hit to trigger action");
129 131
130unsigned int jp_do_irq(unsigned int irq) 132unsigned int jp_do_irq(unsigned int irq)
131{ 133{
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index 146298ad737..c3c0626f550 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -281,7 +281,6 @@ spi_register_board_info(struct spi_board_info const *info, unsigned n)
281 up(&board_lock); 281 up(&board_lock);
282 return 0; 282 return 0;
283} 283}
284EXPORT_SYMBOL_GPL(spi_register_board_info);
285 284
286/* FIXME someone should add support for a __setup("spi", ...) that 285/* FIXME someone should add support for a __setup("spi", ...) that
287 * creates board info from kernel command lines 286 * creates board info from kernel command lines