From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Linus Torvalds <torvalds@linux-foundation.org>,
Andrew Morton <akpm@linux-foundation.org>
Cc: Linux/m68k <linux-m68k@vger.kernel.org>,
Linux Kernel Development <linux-kernel@vger.kernel.org>
Subject: [patch 2/3] Amiga zorro bus: Add missing zorro_device_remove()
Date: Sun, 18 Nov 2007 11:10:04 +0100 [thread overview]
Message-ID: <20071118101155.881152613@mail.of.borg> (raw)
In-Reply-To: 20071118101002.730422886@mail.of.borg
[-- Attachment #1: zorro-add-missing-zorro_device_remove.diff --]
[-- Type: text/plain, Size: 1344 bytes --]
From: Geert Uytterhoeven <geert@linux-m68k.org>
Amiga zorro bus: Add missing zorro_device_remove(). Without this ifconfig and
/proc/net/dev oops after unloading a Zorro network device driver module.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
drivers/zorro/zorro-driver.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
--- a/drivers/zorro/zorro-driver.c
+++ b/drivers/zorro/zorro-driver.c
@@ -60,6 +60,20 @@ static int zorro_device_probe(struct dev
}
+static int zorro_device_remove(struct device *dev)
+{
+ struct zorro_dev *z = to_zorro_dev(dev);
+ struct zorro_driver *drv = to_zorro_driver(dev->driver);
+
+ if (drv) {
+ if (drv->remove)
+ drv->remove(z);
+ z->driver = NULL;
+ }
+ return 0;
+}
+
+
/**
* zorro_register_driver - register a new Zorro driver
* @drv: the driver structure to register
@@ -128,6 +142,7 @@ struct bus_type zorro_bus_type = {
.name = "zorro",
.match = zorro_bus_match,
.probe = zorro_device_probe,
+ .remove = zorro_device_remove,
};
--
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
next prev parent reply other threads:[~2007-11-18 10:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-18 10:10 [patch 0/3] m68k patches for 2.6.24 Geert Uytterhoeven
2007-11-18 10:10 ` [patch 1/3] m68k: export atari_keyb_init Geert Uytterhoeven
2007-11-18 10:10 ` Geert Uytterhoeven [this message]
2007-11-18 10:10 ` [patch 3/3] mac68k: mailing list addresss Geert Uytterhoeven
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071118101155.881152613@mail.of.borg \
--to=geert@linux-m68k.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m68k@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.