Source
418
418
*/
419
419
rdev->destid = destid;
420
420
rdev->hopcount = hopcount;
421
421
}
422
422
423
423
/* If a PE has both switch and other functions, show it as a switch */
424
424
if (rio_is_switch(rdev)) {
425
425
rswitch = rdev->rswitch;
426
426
rswitch->port_ok = 0;
427
427
spin_lock_init(&rswitch->lock);
428
-
rswitch->route_table = kzalloc(sizeof(u8)*
429
-
RIO_MAX_ROUTE_ENTRIES(port->sys_size),
430
-
GFP_KERNEL);
428
+
rswitch->route_table =
429
+
kzalloc(RIO_MAX_ROUTE_ENTRIES(port->sys_size),
430
+
GFP_KERNEL);
431
431
if (!rswitch->route_table)
432
432
goto cleanup;
433
433
/* Initialize switch route table */
434
434
for (rdid = 0; rdid < RIO_MAX_ROUTE_ENTRIES(port->sys_size);
435
435
rdid++)
436
436
rswitch->route_table[rdid] = RIO_INVALID_ROUTE;
437
437
dev_set_name(&rdev->dev, "%02x:s:%04x", rdev->net->id,
438
438
rdev->comp_tag & RIO_CTAG_UDEVID);
439
439
440
440
if (do_enum)