syscon_generic.c (62e8ccc3a489434af379c7f47da71545bc1e14ee) syscon_generic.c (18250ec6c089c0c50cbd9fd87d78e03ff89916df)
1/*-
2 * SPDX-License-Identifier: BSD-2-Clause
3 *
4 * Copyright (c) 2015 Michal Meloun
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

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

189 if (rv != 0) {
190 device_printf(dev, "Failed to create simplebus\n");
191 syscon_generic_detach(dev);
192 return (ENXIO);
193 }
194 sc->simplebus_attached = true;
195 }
196
1/*-
2 * SPDX-License-Identifier: BSD-2-Clause
3 *
4 * Copyright (c) 2015 Michal Meloun
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

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

189 if (rv != 0) {
190 device_printf(dev, "Failed to create simplebus\n");
191 syscon_generic_detach(dev);
192 return (ENXIO);
193 }
194 sc->simplebus_attached = true;
195 }
196
197 return (bus_generic_attach(dev));
197 bus_attach_children(dev);
198 return (0);
198}
199
200static int
201syscon_generic_detach(device_t dev)
202{
203 struct syscon_generic_softc *sc;
204
205 sc = device_get_softc(dev);

--- 31 unchanged lines hidden ---
199}
200
201static int
202syscon_generic_detach(device_t dev)
203{
204 struct syscon_generic_softc *sc;
205
206 sc = device_get_softc(dev);

--- 31 unchanged lines hidden ---