Deleted Added
full compact
ppbconf.c (212413) ppbconf.c (227701)
1/*-
2 * Copyright (c) 1997, 1998, 1999 Nicolas Souchu
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 13 unchanged lines hidden (view full) ---

22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 *
27 */
28
29#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1997, 1998, 1999 Nicolas Souchu
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 13 unchanged lines hidden (view full) ---

22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 *
27 */
28
29#include <sys/cdefs.h>
30__FBSDID("$FreeBSD: head/sys/dev/ppbus/ppbconf.c 212413 2010-09-10 11:19:03Z avg $");
30__FBSDID("$FreeBSD: head/sys/dev/ppbus/ppbconf.c 227701 2011-11-19 10:11:50Z hselasky $");
31#include "opt_ppb_1284.h"
32
33#include <sys/param.h>
34#include <sys/systm.h>
35#include <sys/kernel.h>
36#include <sys/lock.h>
37#include <sys/module.h>
38#include <sys/mutex.h>

--- 378 unchanged lines hidden (view full) ---

417 bus_generic_attach(dev);
418
419 return (0);
420}
421
422static int
423ppbus_detach(device_t dev)
424{
31#include "opt_ppb_1284.h"
32
33#include <sys/param.h>
34#include <sys/systm.h>
35#include <sys/kernel.h>
36#include <sys/lock.h>
37#include <sys/module.h>
38#include <sys/mutex.h>

--- 378 unchanged lines hidden (view full) ---

417 bus_generic_attach(dev);
418
419 return (0);
420}
421
422static int
423ppbus_detach(device_t dev)
424{
425 device_t *children;
426 int error, nchildren, i;
425 int error;
427
428 error = bus_generic_detach(dev);
429 if (error)
430 return (error);
431
432 /* detach & delete all children */
426
427 error = bus_generic_detach(dev);
428 if (error)
429 return (error);
430
431 /* detach & delete all children */
433 if (!device_get_children(dev, &children, &nchildren)) {
434 for (i = 0; i < nchildren; i++)
435 if (children[i])
436 device_delete_child(dev, children[i]);
437 free(children, M_TEMP);
438 }
432 device_delete_all_children(dev);
439
440 return (0);
441}
442
443static int
444ppbus_intr(void *arg)
445{
446 struct ppb_device *ppbdev;

--- 163 unchanged lines hidden ---
433
434 return (0);
435}
436
437static int
438ppbus_intr(void *arg)
439{
440 struct ppb_device *ppbdev;

--- 163 unchanged lines hidden ---