~ubuntu-branches/debian/experimental/linux-tools/experimental

« back to all changes in this revision

Viewing changes to arch/powerpc/include/asm/archrandom.h

  • Committer: Package Import Robot
  • Author(s): Ben Hutchings
  • Date: 2014-02-02 16:57:49 UTC
  • mfrom: (1.1.10) (0.1.21 sid)
  • Revision ID: package-import@ubuntu.com-20140202165749-tw94o9t1t0a8txk6
Tags: 3.13-1~exp2
Merge changes from sid up to 3.12.6-3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef _ASM_POWERPC_ARCHRANDOM_H
 
2
#define _ASM_POWERPC_ARCHRANDOM_H
 
3
 
 
4
#ifdef CONFIG_ARCH_RANDOM
 
5
 
 
6
#include <asm/machdep.h>
 
7
 
 
8
static inline int arch_get_random_long(unsigned long *v)
 
9
{
 
10
        if (ppc_md.get_random_long)
 
11
                return ppc_md.get_random_long(v);
 
12
 
 
13
        return 0;
 
14
}
 
15
 
 
16
static inline int arch_get_random_int(unsigned int *v)
 
17
{
 
18
        unsigned long val;
 
19
        int rc;
 
20
 
 
21
        rc = arch_get_random_long(&val);
 
22
        if (rc)
 
23
                *v = val;
 
24
 
 
25
        return rc;
 
26
}
 
27
 
 
28
int powernv_get_random_long(unsigned long *v);
 
29
 
 
30
#endif /* CONFIG_ARCH_RANDOM */
 
31
 
 
32
#endif /* _ASM_POWERPC_ARCHRANDOM_H */