projects
/
linux-2.6-microblaze.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
stm class: Fix channel bitmap on 32-bit systems
[linux-2.6-microblaze.git]
/
drivers
/
hwtracing
/
stm
/
core.c
diff --git
a/drivers/hwtracing/stm/core.c
b/drivers/hwtracing/stm/core.c
index
5b5807c
..
e55b902
100644
(file)
--- a/
drivers/hwtracing/stm/core.c
+++ b/
drivers/hwtracing/stm/core.c
@@
-166,11
+166,10
@@
stm_master(struct stm_device *stm, unsigned int idx)
static int stp_master_alloc(struct stm_device *stm, unsigned int idx)
{
struct stp_master *master;
static int stp_master_alloc(struct stm_device *stm, unsigned int idx)
{
struct stp_master *master;
- size_t size;
- size = ALIGN(stm->data->sw_nchannels, 8) / 8;
- size += sizeof(struct stp_master);
-
master = kzalloc(size,
GFP_ATOMIC);
+ master = kzalloc(struct_size(master, chan_map,
+ BITS_TO_LONGS(stm->data->sw_nchannels)),
+
GFP_ATOMIC);
if (!master)
return -ENOMEM;
if (!master)
return -ENOMEM;