summaryrefslogtreecommitdiff
path: root/lockme.h
blob: 7cce97bb55330fbe1e755f11865836e25d8ddbe4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#ifndef LOCKME_H
#define LOCKME_H

#include <sys/mman.h>

#include "die.h"

static inline void xlockme(void)
{
	if (mlockall(MCL_CURRENT | MCL_FUTURE) != 0)
		panic("Cannot lock pages!\n");
}

static inline void xunlockme(void)
{
	munlockall();
}

#endif /* LOCKME_H */
e='0' selected='selected'>includemode:
authorGreg Kroah-Hartman <gregkh@google.com>2016-08-17 16:44:11 +0200
committerGreg Kroah-Hartman <gregkh@google.com>2016-09-02 14:20:56 +0200
commit1521eb6b6995dd8db57c96d36bc3c64b2a7da3b1 (patch)
tree6f2a14abddaf698541ca5fc23c6613e04cb306ab /drivers/staging
parentfc994f0f8363eb4c50361800c7d2217eb0306014 (diff)
greybus: es2: No need to check before freeing an urb
usb_kill_urb() and usb_free_urb() can be called with NULL pointers, so no need to check before calling them. Reviewed-by: Johan Hovold <johan@hovoldconsulting.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/greybus/es2.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/staging/greybus/es2.c b/drivers/staging/greybus/es2.c