From 5692d7003e0f2f9431f401cdf7c70212af3e3000 Mon Sep 17 00:00:00 2001 From: Shao Miller Date: Tue, 28 Dec 2010 16:51:04 -0500 Subject: [PATCH 1/1] [bus] Remove WvBusCreatePdo_ We'll never really use it. --- src/winvblock/bus/bus.c | 56 ----------------------------------------- 1 file changed, 56 deletions(-) diff --git a/src/winvblock/bus/bus.c b/src/winvblock/bus/bus.c index feb1ae9..94bacac 100644 --- a/src/winvblock/bus/bus.c +++ b/src/winvblock/bus/bus.c @@ -57,7 +57,6 @@ typedef struct WV_BUS_WORK_ITEM_ { /* Forward declarations. */ static WV_F_DEV_FREE WvBusFree_; -static WV_F_DEV_CREATE_PDO WvBusCreatePdo_; static WV_F_BUS_THREAD WvBusDefaultThread_; static winvblock__bool WvBusAddWorkItem_( WV_SP_BUS_T, @@ -178,7 +177,6 @@ winvblock__lib_func void WvBusInit(WV_SP_BUS_T Bus) { InitializeListHead(&Bus->BusPrivate_.WorkItems); KeInitializeEvent(&Bus->ThreadSignal, SynchronizationEvent, FALSE); KeInitializeEvent(&Bus->ThreadStopped, SynchronizationEvent, FALSE); - Bus->Dev.Ops.CreatePdo = WvBusCreatePdo_; Bus->Dev.Ops.Init = WvBusDevInit_; Bus->Dev.Ops.Free = WvBusFree_; Bus->Dev.ext = Bus; @@ -215,60 +213,6 @@ winvblock__lib_func WV_SP_BUS_T WvBusCreate(void) { return NULL; } -/** - * Create a bus PDO. - * - * @v dev Populate PDO dev. ext. space from these details. - * @ret PDEVICE_OBJECT Points to the new PDO, or is NULL upon failure. - * - * Returns a Physical Device Object pointer on success, NULL for failure. - */ -static PDEVICE_OBJECT STDCALL WvBusCreatePdo_(IN WV_SP_DEV_T dev) { - PDEVICE_OBJECT pdo = NULL; - WV_SP_BUS_T bus; - NTSTATUS status; - - /* Note the bus device needing a PDO. */ - if (dev == NULL) { - DBG("No device passed\n"); - return NULL; - } - bus = WvBusFromDev(dev); - /* Create the PDO. */ - status = IoCreateDevice( - dev->DriverObject, - sizeof (driver__dev_ext), - NULL, - FILE_DEVICE_CONTROLLER, - FILE_DEVICE_SECURE_OPEN, - FALSE, - &pdo - ); - if (pdo == NULL) { - DBG("IoCreateDevice() failed!\n"); - goto err_pdo; - } - - /* Set associations for the bus, device, PDO. */ - WvDevForDevObj(pdo, dev); - dev->Self = bus->PhysicalDeviceObject = pdo; - - /* Set some DEVICE_OBJECT status. */ - pdo->Flags |= DO_DIRECT_IO; /* FIXME? */ - pdo->Flags |= DO_POWER_INRUSH; /* FIXME? */ - pdo->Flags &= ~DO_DEVICE_INITIALIZING; - #ifdef RIS - dev->State = Started; - #endif - - return pdo; - - IoDeleteDevice(pdo); - err_pdo: - - return NULL; - } - /** * Default bus deletion operation. * -- 2.17.1