summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2024-05-14 21:04:05 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2024-05-14 21:04:05 +0300
commit1338acfe629ddd955fd524fc01e26bca4f1bb22b (patch)
treed8bcff8909bb24fa815ab0350b2d93539fd333c4 /drivers
parent9776dd36095be19f5a0ad9f07a4fc221d2a0609a (diff)
parentec8c8266373f6283a3e99b036aea7b9428480625 (diff)
downloadlinux-1338acfe629ddd955fd524fc01e26bca4f1bb22b.tar.xz
Merge tag 'm68k-for-v6.10-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k
Pull m68k updates from Geert Uytterhoeven: - Fix invalid context sleep and reboot hang on Mac - Fix spinlock race in kernel thread creation - Miscellaneous fixes and improvements - defconfig updates * tag 'm68k-for-v6.10-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k: m68k: defconfig: Update defconfigs for v6.9-rc1 m68k: Move ARCH_HAS_CPU_CACHE_ALIASING m68k: mac: Fix reboot hang on Mac IIci m68k: Fix spinlock race in kernel thread creation m68k: Let GENERIC_IOMAP depend on HAS_IOPORT m68k: amiga: Use str_plural() to fix Coccinelle warning macintosh/via-macii: Fix "BUG: sleeping function called from invalid context" zorro: Use helpers from ioport.h m68k: Calculate THREAD_SIZE from THREAD_SIZE_ORDER
Diffstat (limited to 'drivers')
-rw-r--r--drivers/macintosh/via-macii.c11
-rw-r--r--drivers/zorro/zorro.c14
2 files changed, 7 insertions, 18 deletions
diff --git a/drivers/macintosh/via-macii.c b/drivers/macintosh/via-macii.c
index db9270da5b8e..b6ddf1d47cb4 100644
--- a/drivers/macintosh/via-macii.c
+++ b/drivers/macintosh/via-macii.c
@@ -140,24 +140,19 @@ static int macii_probe(void)
/* Initialize the driver */
static int macii_init(void)
{
- unsigned long flags;
int err;
- local_irq_save(flags);
-
err = macii_init_via();
if (err)
- goto out;
+ return err;
err = request_irq(IRQ_MAC_ADB, macii_interrupt, 0, "ADB",
macii_interrupt);
if (err)
- goto out;
+ return err;
macii_state = idle;
-out:
- local_irq_restore(flags);
- return err;
+ return 0;
}
/* initialize the hardware */
diff --git a/drivers/zorro/zorro.c b/drivers/zorro/zorro.c
index 1b9928648583..2196474ce6ef 100644
--- a/drivers/zorro/zorro.c
+++ b/drivers/zorro/zorro.c
@@ -117,17 +117,13 @@ static struct resource __init *zorro_find_parent_resource(
int i;
for (i = 0; i < bridge->num_resources; i++) {
- struct resource *r = &bridge->resource[i];
-
- if (zorro_resource_start(z) >= r->start &&
- zorro_resource_end(z) <= r->end)
- return r;
+ if (resource_contains(&bridge->resource[i], &z->resource))
+ return &bridge->resource[i];
}
+
return &iomem_resource;
}
-
-
static int __init amiga_zorro_probe(struct platform_device *pdev)
{
struct zorro_bus *bus;
@@ -176,9 +172,7 @@ static int __init amiga_zorro_probe(struct platform_device *pdev)
z->slotsize = zi->slotsize;
sprintf(z->name, "Zorro device %08x", z->id);
zorro_name_device(z);
- z->resource.start = zi->boardaddr;
- z->resource.end = zi->boardaddr + zi->boardsize - 1;
- z->resource.name = z->name;
+ z->resource = DEFINE_RES_MEM_NAMED(zi->boardaddr, zi->boardsize, z->name);
r = zorro_find_parent_resource(pdev, z);
error = request_resource(r, &z->resource);
if (error && !(z->rom.er_Type & ERTF_MEMLIST))