Skip to content

Commit 19263bb

Browse files
committed
sysfs.h: remove typedef for DeviceEndpoint
Just use the structure name instead. Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent fe39c3f commit 19263bb

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

sysfs.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ static int sysfs_int(const char *dir, const char *filename, int base)
152152
return value;
153153
}
154154

155-
static void DestroyEndpoint (DeviceEndpoint *endpoint)
155+
static void DestroyEndpoint (struct DeviceEndpoint *endpoint)
156156
{
157157
if (endpoint == NULL)
158158
return;
@@ -422,7 +422,7 @@ static void entity_add(struct list_head *list, struct entity *e)
422422

423423
static void endpoint_parse(struct DeviceInterface *interface, const char *dir)
424424
{
425-
DeviceEndpoint *endpoint;
425+
struct DeviceEndpoint *endpoint;
426426
int i;
427427

428428
/* find a place in this interface to place the endpoint */
@@ -437,7 +437,7 @@ static void endpoint_parse(struct DeviceInterface *interface, const char *dir)
437437
return;
438438
}
439439

440-
endpoint = (DeviceEndpoint *)g_malloc0 (sizeof(DeviceEndpoint));
440+
endpoint = g_malloc0(sizeof(struct DeviceEndpoint));
441441

442442
endpoint->attribute = sysfs_int(dir, "bmAttributes", 16);
443443
endpoint->maxPacketSize = sysfs_int(dir, "wMaxPacketSize", 16);

sysfs.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@
1818
#define INTERFACE_DRIVERNAME_NODRIVER_STRING "(none)"
1919
#define INTERFACE_DRIVERNAME_STRING_MAXLENGTH 50
2020

21-
typedef struct DeviceEndpoint {
21+
struct DeviceEndpoint {
2222
gint address;
2323
gboolean in; /* TRUE if in, FALSE if out */
2424
gint attribute;
2525
gchar *type;
2626
gint maxPacketSize;
2727
gchar *interval;
28-
} DeviceEndpoint;
28+
};
2929

3030
struct DeviceInterface {
3131
gchar *name;
@@ -35,7 +35,7 @@ struct DeviceInterface {
3535
gint subClass;
3636
gint protocol;
3737
gchar *class;
38-
DeviceEndpoint *endpoint[MAX_ENDPOINTS];
38+
struct DeviceEndpoint *endpoint[MAX_ENDPOINTS];
3939
gboolean driverAttached; /* TRUE if driver is attached to this interface currently */
4040
};
4141

usbtree.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ static void PopulateListBox (int deviceId)
176176
/* show all of the endpoints for this interface */
177177
for (endpointNum = 0; endpointNum < MAX_ENDPOINTS; ++endpointNum) {
178178
if (interface->endpoint[endpointNum]) {
179-
DeviceEndpoint *endpoint = interface->endpoint[endpointNum];
179+
struct DeviceEndpoint *endpoint = interface->endpoint[endpointNum];
180180

181181
sprintf (string, "\n\n\t\t\tEndpoint Address: %.2x\n\t\t\t"
182182
"Direction: %s\n\t\t\tAttribute: %i\n\t\t\t"

0 commit comments

Comments
 (0)