diff options
Diffstat (limited to 'drivers/mfd/ab8500-debugfs.c')
-rw-r--r-- | drivers/mfd/ab8500-debugfs.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/mfd/ab8500-debugfs.c b/drivers/mfd/ab8500-debugfs.c index 7d1f1b08fc4b..e33e385af0a2 100644 --- a/drivers/mfd/ab8500-debugfs.c +++ b/drivers/mfd/ab8500-debugfs.c | |||
@@ -159,7 +159,7 @@ static struct hwreg_cfg hwreg_cfg = { | |||
159 | 159 | ||
160 | static struct ab8500_prcmu_ranges *debug_ranges; | 160 | static struct ab8500_prcmu_ranges *debug_ranges; |
161 | 161 | ||
162 | struct ab8500_prcmu_ranges ab8500_debug_ranges[AB8500_NUM_BANKS] = { | 162 | static struct ab8500_prcmu_ranges ab8500_debug_ranges[AB8500_NUM_BANKS] = { |
163 | [0x0] = { | 163 | [0x0] = { |
164 | .num_ranges = 0, | 164 | .num_ranges = 0, |
165 | .range = NULL, | 165 | .range = NULL, |
@@ -488,7 +488,7 @@ struct ab8500_prcmu_ranges ab8500_debug_ranges[AB8500_NUM_BANKS] = { | |||
488 | }, | 488 | }, |
489 | }; | 489 | }; |
490 | 490 | ||
491 | struct ab8500_prcmu_ranges ab8505_debug_ranges[AB8500_NUM_BANKS] = { | 491 | static struct ab8500_prcmu_ranges ab8505_debug_ranges[AB8500_NUM_BANKS] = { |
492 | [0x0] = { | 492 | [0x0] = { |
493 | .num_ranges = 0, | 493 | .num_ranges = 0, |
494 | .range = NULL, | 494 | .range = NULL, |
@@ -847,7 +847,7 @@ struct ab8500_prcmu_ranges ab8505_debug_ranges[AB8500_NUM_BANKS] = { | |||
847 | }, | 847 | }, |
848 | }; | 848 | }; |
849 | 849 | ||
850 | struct ab8500_prcmu_ranges ab8540_debug_ranges[AB8500_NUM_BANKS] = { | 850 | static struct ab8500_prcmu_ranges ab8540_debug_ranges[AB8500_NUM_BANKS] = { |
851 | [AB8500_M_FSM_RANK] = { | 851 | [AB8500_M_FSM_RANK] = { |
852 | .num_ranges = 1, | 852 | .num_ranges = 1, |
853 | .range = (struct ab8500_reg_range[]) { | 853 | .range = (struct ab8500_reg_range[]) { |
@@ -1377,7 +1377,7 @@ void ab8500_dump_all_banks(struct device *dev) | |||
1377 | 1377 | ||
1378 | /* Space for 500 registers. */ | 1378 | /* Space for 500 registers. */ |
1379 | #define DUMP_MAX_REGS 700 | 1379 | #define DUMP_MAX_REGS 700 |
1380 | struct ab8500_register_dump | 1380 | static struct ab8500_register_dump |
1381 | { | 1381 | { |
1382 | u8 bank; | 1382 | u8 bank; |
1383 | u8 reg; | 1383 | u8 reg; |
@@ -2800,7 +2800,13 @@ static ssize_t ab8500_subscribe_write(struct file *file, | |||
2800 | */ | 2800 | */ |
2801 | dev_attr[irq_index] = kmalloc(sizeof(struct device_attribute), | 2801 | dev_attr[irq_index] = kmalloc(sizeof(struct device_attribute), |
2802 | GFP_KERNEL); | 2802 | GFP_KERNEL); |
2803 | if (!dev_attr[irq_index]) | ||
2804 | return -ENOMEM; | ||
2805 | |||
2803 | event_name[irq_index] = kmalloc(count, GFP_KERNEL); | 2806 | event_name[irq_index] = kmalloc(count, GFP_KERNEL); |
2807 | if (!event_name[irq_index]) | ||
2808 | return -ENOMEM; | ||
2809 | |||
2804 | sprintf(event_name[irq_index], "%lu", user_val); | 2810 | sprintf(event_name[irq_index], "%lu", user_val); |
2805 | dev_attr[irq_index]->show = show_irq; | 2811 | dev_attr[irq_index]->show = show_irq; |
2806 | dev_attr[irq_index]->store = NULL; | 2812 | dev_attr[irq_index]->store = NULL; |