subr_bus.c (239299) | subr_bus.c (239512) |
---|---|
1/*- 2 * Copyright (c) 1997,1998,2003 Doug Rabson 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 --- 11 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 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#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1997,1998,2003 Doug Rabson 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 --- 11 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 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#include <sys/cdefs.h> |
28__FBSDID("$FreeBSD: head/sys/kern/subr_bus.c 239299 2012-08-15 15:42:57Z hselasky $"); | 28__FBSDID("$FreeBSD: head/sys/kern/subr_bus.c 239512 2012-08-21 18:13:09Z jhb $"); |
29 30#include "opt_bus.h" 31 32#include <sys/param.h> 33#include <sys/conf.h> 34#include <sys/filio.h> 35#include <sys/lock.h> 36#include <sys/kernel.h> --- 1831 unchanged lines hidden (view full) --- 1868 if (error) 1869 return (error); 1870 } 1871 1872 if ((error = device_detach(child)) != 0) 1873 return (error); 1874 if (child->devclass) 1875 devclass_delete_device(child->devclass, child); | 29 30#include "opt_bus.h" 31 32#include <sys/param.h> 33#include <sys/conf.h> 34#include <sys/filio.h> 35#include <sys/lock.h> 36#include <sys/kernel.h> --- 1831 unchanged lines hidden (view full) --- 1868 if (error) 1869 return (error); 1870 } 1871 1872 if ((error = device_detach(child)) != 0) 1873 return (error); 1874 if (child->devclass) 1875 devclass_delete_device(child->devclass, child); |
1876 if (child->parent) 1877 BUS_CHILD_DELETED(dev, child); |
|
1876 TAILQ_REMOVE(&dev->children, child, link); 1877 TAILQ_REMOVE(&bus_data_devices, child, devlink); 1878 kobj_delete((kobj_t) child, M_BUS); 1879 1880 bus_data_generation_update(); 1881 return (0); 1882} 1883 --- 2945 unchanged lines hidden --- | 1878 TAILQ_REMOVE(&dev->children, child, link); 1879 TAILQ_REMOVE(&bus_data_devices, child, devlink); 1880 kobj_delete((kobj_t) child, M_BUS); 1881 1882 bus_data_generation_update(); 1883 return (0); 1884} 1885 --- 2945 unchanged lines hidden --- |