Skip to content

Commit 4c9c547

Browse files
committed
Fix for bug in mbox_read. Thanks lp0
1 parent d25ac7a commit 4c9c547

File tree

3 files changed

+2
-7
lines changed

3 files changed

+2
-7
lines changed

arch/arm/mach-bcm2708/power.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,6 @@ int bcm_power_request(BCM_POWER_HANDLE_T handle, uint32_t request)
9797
bcm_mailbox_write(MBOX_CHAN_POWER,
9898
global_request << 4);
9999

100-
/* Wait for a response during power-up */
101-
mdelay(10);
102100
if (global_request & ~g_state.global_request) {
103101
rc = bcm_mailbox_read(MBOX_CHAN_POWER,
104102
&actual);

arch/arm/mach-bcm2708/vcio.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,7 @@ static int mbox_read(struct vc_mailbox *mbox, unsigned chan, uint32_t *data28)
119119
if (mbox->magic != MBOX_MAGIC)
120120
rc = -EINVAL;
121121
else {
122-
if (mbox->msg[chan] ||
123-
(down_interruptible(&mbox->sema[chan]) == 0)) {
122+
if (down_interruptible(&mbox->sema[chan]) == 0) {
124123
*data28 = MBOX_DATA28(mbox->msg[chan]);
125124
mbox->msg[chan] = 0;
126125
rc = 0;

drivers/video/bcm2708_fb.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
#include <linux/errno.h>
1919
#include <linux/string.h>
2020
#include <linux/slab.h>
21-
#include <linux/delay.h>
2221
#include <linux/mm.h>
2322
#include <linux/fb.h>
2423
#include <linux/init.h>
@@ -221,8 +220,7 @@ static int bcm2708_fb_set_par(struct fb_info *info)
221220
/* inform vc about new framebuffer */
222221
bcm_mailbox_write(MBOX_CHAN_FB, fb->dma);
223222

224-
/* workaround occasional failure to read results. TODO: replace fb driver with vchiq version */
225-
msleep(10);
223+
/* TODO: replace fb driver with vchiq version */
226224
/* wait for response */
227225
bcm_mailbox_read(MBOX_CHAN_FB, &val);
228226

0 commit comments

Comments
 (0)