Deleted Added
full compact
usb_util.c (217265) usb_util.c (227701)
1/* $FreeBSD: head/sys/dev/usb/usb_util.c 217265 2011-01-11 13:59:06Z jhb $ */
1/* $FreeBSD: head/sys/dev/usb/usb_util.c 227701 2011-11-19 10:11:50Z hselasky $ */
2/*-
3 * Copyright (c) 2008 Hans Petter Selasky. 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
9 * notice, this list of conditions and the following disclaimer.

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

53#include <dev/usb/usb_device.h>
54#include <dev/usb/usb_request.h>
55#include <dev/usb/usb_busdma.h>
56
57#include <dev/usb/usb_controller.h>
58#include <dev/usb/usb_bus.h>
59
60/*------------------------------------------------------------------------*
2/*-
3 * Copyright (c) 2008 Hans Petter Selasky. 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
9 * notice, this list of conditions and the following disclaimer.

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

53#include <dev/usb/usb_device.h>
54#include <dev/usb/usb_request.h>
55#include <dev/usb/usb_busdma.h>
56
57#include <dev/usb/usb_controller.h>
58#include <dev/usb/usb_bus.h>
59
60/*------------------------------------------------------------------------*
61 * device_delete_all_children - delete all children of a device
62 *------------------------------------------------------------------------*/
63#ifndef device_delete_all_children
64int
65device_delete_all_children(device_t dev)
66{
67 device_t *devlist;
68 int devcount;
69 int error;
70
71 error = device_get_children(dev, &devlist, &devcount);
72 if (error == 0) {
73 while (devcount-- > 0) {
74 error = device_delete_child(dev, devlist[devcount]);
75 if (error) {
76 break;
77 }
78 }
79 free(devlist, M_TEMP);
80 }
81 return (error);
82}
83#endif
84
85/*------------------------------------------------------------------------*
86 * device_set_usb_desc
87 *
88 * This function can be called at probe or attach to set the USB
89 * device supplied textual description for the given device.
90 *------------------------------------------------------------------------*/
91void
92device_set_usb_desc(device_t dev)
93{

--- 155 unchanged lines hidden ---
61 * device_set_usb_desc
62 *
63 * This function can be called at probe or attach to set the USB
64 * device supplied textual description for the given device.
65 *------------------------------------------------------------------------*/
66void
67device_set_usb_desc(device_t dev)
68{

--- 155 unchanged lines hidden ---