Skip to content

Commit 576d529

Browse files
Finn Thainmpe
authored andcommitted
macintosh/via-pmu: Add missing mmio accessors
Add missing in_8() accessors to init_pmu() and pmu_sr_intr(). This fixes several sparse warnings: drivers/macintosh/via-pmu.c:536:29: warning: dereference of noderef expression drivers/macintosh/via-pmu.c:537:33: warning: dereference of noderef expression drivers/macintosh/via-pmu.c:1455:17: warning: dereference of noderef expression drivers/macintosh/via-pmu.c:1456:69: warning: dereference of noderef expression Tested-by: Stan Johnson <userm57@yahoo.com> Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
1 parent 73f4447 commit 576d529

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

drivers/macintosh/via-pmu.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -534,8 +534,9 @@ init_pmu(void)
534534
int timeout;
535535
struct adb_request req;
536536

537-
out_8(&via[B], via[B] | TREQ); /* negate TREQ */
538-
out_8(&via[DIRB], (via[DIRB] | TREQ) & ~TACK); /* TACK in, TREQ out */
537+
/* Negate TREQ. Set TACK to input and TREQ to output. */
538+
out_8(&via[B], in_8(&via[B]) | TREQ);
539+
out_8(&via[DIRB], (in_8(&via[DIRB]) | TREQ) & ~TACK);
539540

540541
pmu_request(&req, NULL, 2, PMU_SET_INTR_MASK, pmu_intr_mask);
541542
timeout = 100000;
@@ -1418,8 +1419,8 @@ pmu_sr_intr(void)
14181419
struct adb_request *req;
14191420
int bite = 0;
14201421

1421-
if (via[B] & TREQ) {
1422-
printk(KERN_ERR "PMU: spurious SR intr (%x)\n", via[B]);
1422+
if (in_8(&via[B]) & TREQ) {
1423+
printk(KERN_ERR "PMU: spurious SR intr (%x)\n", in_8(&via[B]));
14231424
out_8(&via[IFR], SR_INT);
14241425
return NULL;
14251426
}

0 commit comments

Comments
 (0)