atopcase.c (18250ec6c089c0c50cbd9fd87d78e03ff89916df) atopcase.c (3ddaf8200bc90b1410755ebac7b5c979ea90a2f6)
1/*-
2 * SPDX-License-Identifier: BSD-2-Clause
3 *
4 * Copyright (c) 2021-2023 Val Packett <val@packett.cool>
5 * Copyright (c) 2023 Vladimir Kondratyev <wulf@FreeBSD.org>
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

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

540 return (err);
541}
542
543int
544atopcase_destroy(struct atopcase_softc *sc)
545{
546 int err;
547
1/*-
2 * SPDX-License-Identifier: BSD-2-Clause
3 *
4 * Copyright (c) 2021-2023 Val Packett <val@packett.cool>
5 * Copyright (c) 2023 Vladimir Kondratyev <wulf@FreeBSD.org>
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

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

540 return (err);
541}
542
543int
544atopcase_destroy(struct atopcase_softc *sc)
545{
546 int err;
547
548 err = device_delete_children(sc->sc_dev);
548 err = bus_generic_detach(sc->sc_dev);
549 if (err)
550 return (err);
551
552 if (sc->sc_backlight)
553 backlight_destroy(sc->sc_backlight);
554
555 return (0);
556}

--- 167 unchanged lines hidden ---
549 if (err)
550 return (err);
551
552 if (sc->sc_backlight)
553 backlight_destroy(sc->sc_backlight);
554
555 return (0);
556}

--- 167 unchanged lines hidden ---