summaryrefslogtreecommitdiff
path: root/rnd.h
blob: 154fccfb75a42fcd89e56c197b0de8f2d997371d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#ifndef RND_H
#define RND_H

#define HIG_ENTROPY_SOURCE	"/dev/random"
#define LOW_ENTROPY_SOURCE	"/dev/urandom"

/* secrand is not really secure, but the name only suggests it's better to use
 * than rand(3) when transferring bytes over the network in non-security
 * critical structure members. secrand() is only used to fill up salts actually.
 */
extern int secrand(void);
extern void gen_key_bytes(unsigned char *area, size_t len);

#endif /* RND_H */
form.submit();'>
authorRui Miguel Silva <rui.silva@linaro.org>2016-08-16 22:31:56 +0100
committerGreg Kroah-Hartman <gregkh@google.com>2016-08-18 17:34:01 +0200
commit5f66d62e8372d8a9c97bd75d772a5a5788925218 (patch)
tree44676a02dfa6bdad107f68a85e7a37928dfc1eee /drivers
parentc4582f9d7969019dc67234e96340e21dd3712c46 (diff)
greybus: power_supply: fix update interval check at request handler
We use the update interval to control the remove path and we set it to zero when we do not want to have more updates in transit. That means that the check in the request handler needs to be for interval update zero to discard the newly received request and not the other way around like it is. This will fix the issue that all incoming requests were being discard. Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/greybus/power_supply.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/greybus/power_supply.c b/drivers/staging/greybus/power_supply.c