Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'm68k-for-v7.0-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k

Pull m68k updates from Geert Uytterhoeven:

- Add missing put_device() in the NuBus driver

- Replace vsprintf() with vsnprintf() on Sun-3

* tag 'm68k-for-v7.0-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k:
m68k: sun3: Replace vsprintf() with bounded vsnprintf()
nubus: Call put_device() in bus initialization error path

+14 -18
+2 -2
arch/m68k/sun3/prom/printf.c
··· 30 30 31 31 #ifdef CONFIG_KGDB 32 32 ppbuf[0] = 'O'; 33 - vsprintf(ppbuf + 1, fmt, args) + 1; 33 + vsnprintf(ppbuf + 1, sizeof(ppbuf) - 1, fmt, args); 34 34 #else 35 - vsprintf(ppbuf, fmt, args); 35 + vsnprintf(ppbuf, sizeof(ppbuf), fmt, args); 36 36 #endif 37 37 38 38 bptr = ppbuf;
+2 -11
drivers/nubus/bus.c
··· 51 51 } 52 52 EXPORT_SYMBOL(nubus_driver_unregister); 53 53 54 - static struct device nubus_parent = { 55 - .init_name = "nubus", 56 - }; 57 - 58 54 static int __init nubus_bus_register(void) 59 55 { 60 56 return bus_register(&nubus_bus_type); 61 57 } 62 58 postcore_initcall(nubus_bus_register); 63 - 64 - int __init nubus_parent_device_register(void) 65 - { 66 - return device_register(&nubus_parent); 67 - } 68 59 69 60 static void nubus_device_release(struct device *dev) 70 61 { ··· 70 79 kfree(board); 71 80 } 72 81 73 - int nubus_device_register(struct nubus_board *board) 82 + int nubus_device_register(struct device *parent, struct nubus_board *board) 74 83 { 75 - board->dev.parent = &nubus_parent; 84 + board->dev.parent = parent; 76 85 board->dev.release = nubus_device_release; 77 86 board->dev.bus = &nubus_bus_type; 78 87 dev_set_name(&board->dev, "slot.%X", board->slot);
+9 -3
drivers/nubus/nubus.c
··· 41 41 42 42 LIST_HEAD(nubus_func_rsrcs); 43 43 44 + static struct device nubus_parent = { 45 + .init_name = "nubus", 46 + }; 47 + 44 48 /* Meaning of "bytelanes": 45 49 46 50 The card ROM may appear on any or all bytes of each long word in ··· 833 829 list_add_tail(&fres->list, &nubus_func_rsrcs); 834 830 } 835 831 836 - if (nubus_device_register(board)) 832 + if (nubus_device_register(&nubus_parent, board)) 837 833 put_device(&board->dev); 838 834 } 839 835 ··· 886 882 return 0; 887 883 888 884 nubus_proc_init(); 889 - err = nubus_parent_device_register(); 890 - if (err) 885 + err = device_register(&nubus_parent); 886 + if (err) { 887 + put_device(&nubus_parent); 891 888 return err; 889 + } 892 890 nubus_scan_bus(); 893 891 return 0; 894 892 }
+1 -2
include/linux/nubus.h
··· 162 162 unsigned char *nubus_dirptr(const struct nubus_dirent *nd); 163 163 164 164 /* Declarations relating to driver model objects */ 165 - int nubus_parent_device_register(void); 166 - int nubus_device_register(struct nubus_board *board); 165 + int nubus_device_register(struct device *parent, struct nubus_board *board); 167 166 int nubus_driver_register(struct nubus_driver *ndrv); 168 167 void nubus_driver_unregister(struct nubus_driver *ndrv); 169 168 int nubus_proc_show(struct seq_file *m, void *data);