* 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:
@@ -240,7 +240,7 @@ usb_hid_close(void *_cookie)
|
|||||||
device_cookie *cookie = (device_cookie *)_cookie;
|
device_cookie *cookie = (device_cookie *)_cookie;
|
||||||
|
|
||||||
TRACE("close(%p)\n", cookie);
|
TRACE("close(%p)\n", cookie);
|
||||||
return cookie->handler->Close();
|
return cookie->handler->Close(&cookie->cookie);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ ProtocolHandler::Open(uint32 flags, uint32 *cookie)
|
|||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
ProtocolHandler::Close()
|
ProtocolHandler::Close(uint32 *cookie)
|
||||||
{
|
{
|
||||||
return fDevice->Close(this);
|
return fDevice->Close(this);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,20 +20,20 @@ public:
|
|||||||
size_t ringBufferSize);
|
size_t ringBufferSize);
|
||||||
virtual ~ProtocolHandler();
|
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);
|
void SetPublishPath(char *publishPath);
|
||||||
const char * PublishPath() { return fPublishPath; };
|
const char * PublishPath() { return fPublishPath; }
|
||||||
|
|
||||||
static void AddHandlers(HIDDevice *device,
|
static void AddHandlers(HIDDevice *device,
|
||||||
ProtocolHandler ***handlerList,
|
ProtocolHandler ***handlerList,
|
||||||
uint32 *handlerCount);
|
uint32 *handlerCount);
|
||||||
|
|
||||||
virtual status_t Open(uint32 flags, uint32 *cookie);
|
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,
|
virtual status_t Control(uint32 *cookie, uint32 op, void *buffer,
|
||||||
size_t length);
|
size_t length);
|
||||||
|
|||||||
Reference in New Issue
Block a user