[lkml]   [1996]   [May]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
SubjectRe: Dummy driver broken in pre-2.0.5
>  *          Thomas Bogendoerfer :       Return ENODEV for dev_open, if there
> * is no device open function.
> breaks the dummy device; unless it is compiled as a module, it has no
> device open function. I did

upps, that's the second thing, which broke because my change:-(

> I'm sure there is a good reason that this is the wrong solution, but
> It Works For Me

your patch is ok. But I don't see a reason, why we should use two
different open routines.


--- orig/linux-pre-2.0.5/drivers/net/dummy.c Wed May 8 20:29:10 1996
+++ linux-pre-2.0.5/drivers/net/dummy.c Sun May 19 12:45:50 1996
@@ -58,19 +58,22 @@
static struct enet_statistics *dummy_get_stats(struct device *dev);

-#ifdef MODULE
static int dummy_open(struct device *dev)
+#ifdef MODULE
return 0;

static int dummy_close(struct device *dev)
+#ifdef MODULE
return 0;

int dummy_init(struct device *dev)
@@ -89,10 +92,8 @@
memset(dev->priv, 0, sizeof(struct enet_statistics));
dev->get_stats = dummy_get_stats;
-#ifdef MODULE
dev->open = &dummy_open;
dev->stop = &dummy_close;

/* Fill in the fields of the device structure with ethernet-generic values. */
That process _deserves_ to die ("My name is Linus Torvalds, prepare to
die"). [Linus Torvalds on linux-kernel]

 \ /
  Last update: 2005-03-22 13:37    [W:0.018 / U:2.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site