* Pass the cookie to ProtocolHandler::Close() as well.

* Removed superfluous semicolons.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36280 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2010-04-15 08:31:50 +00:00
parent 447b0afd93
commit 7089514138
3 changed files with 7 additions and 7 deletions

View File

@ -240,7 +240,7 @@ usb_hid_close(void *_cookie)
device_cookie *cookie = (device_cookie *)_cookie;
TRACE("close(%p)\n", cookie);
return cookie->handler->Close();
return cookie->handler->Close(&cookie->cookie);
}

View File

@ -111,7 +111,7 @@ ProtocolHandler::Open(uint32 flags, uint32 *cookie)
status_t
ProtocolHandler::Close()
ProtocolHandler::Close(uint32 *cookie)
{
return fDevice->Close(this);
}

View File

@ -20,20 +20,20 @@ public:
size_t ringBufferSize);
virtual ~ProtocolHandler();
status_t InitCheck() { return fStatus; };
status_t InitCheck() { return fStatus; }
HIDDevice * Device() { return fDevice; };
HIDDevice * Device() { return fDevice; }
const char * BasePath() { return fBasePath; };
const char * BasePath() { return fBasePath; }
void SetPublishPath(char *publishPath);
const char * PublishPath() { return fPublishPath; };
const char * PublishPath() { return fPublishPath; }
static void AddHandlers(HIDDevice *device,
ProtocolHandler ***handlerList,
uint32 *handlerCount);
virtual status_t Open(uint32 flags, uint32 *cookie);
virtual status_t Close();
virtual status_t Close(uint32 *cookie);
virtual status_t Control(uint32 *cookie, uint32 op, void *buffer,
size_t length);