mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@digeo.com>
To: Adrian Bunk <bunk@fs.tum.de>
Cc: hch@infradead.org, linux-kernel@vger.kernel.org,
	linux-net@vger.kernel.org, fventuri@mediaone.net
Subject: Re: 2.5.69-mm5: sb1000.c: undefined reference to `alloc_netdev'
Date: Wed, 14 May 2003 10:31:15 -0700	[thread overview]
Message-ID: <20030514103115.465d18a8.akpm@digeo.com> (raw)
In-Reply-To: <20030514144727.GG1346@fs.tum.de>

Adrian Bunk <bunk@fs.tum.de> wrote:
>
> drivers/built-in.o(.text+0x22e7b5): In function `sb1000_probe_one':
>  : undefined reference to `alloc_netdev'
>  ...

This should fix.  I'm not sure why it's overriding dev->flags.


 drivers/net/sb1000.c |   18 ++++++------------
 1 files changed, 6 insertions(+), 12 deletions(-)

diff -puN drivers/net/sb1000.c~sb1000-fix drivers/net/sb1000.c
--- 25/drivers/net/sb1000.c~sb1000-fix	2003-05-14 10:24:35.000000000 -0700
+++ 25-akpm/drivers/net/sb1000.c	2003-05-14 10:30:36.000000000 -0700
@@ -137,17 +137,6 @@ static const struct pnp_device_id sb1000
 };
 MODULE_DEVICE_TABLE(pnp, sb1000_pnp_ids);
 
-static void
-sb1000_setup(struct net_device *dev)
-{
-	dev->type		= ARPHRD_ETHER;
-	dev->mtu		= 1500;
-	dev->addr_len		= ETH_ALEN;
-
-	/* New-style flags. */
-	dev->flags		= IFF_POINTOPOINT|IFF_NOARP;
-}
-
 static int
 sb1000_probe_one(struct pnp_dev *pdev, const struct pnp_device_id *id)
 {
@@ -188,11 +177,16 @@ sb1000_probe_one(struct pnp_dev *pdev, c
 			"S/N %#8.8x, IRQ %d.\n", dev->name, dev->base_addr,
 			dev->mem_start, serial_number, dev->irq);
 
-	dev = alloc_netdev(sizeof(struct sb1000_private), "cm%d", sb1000_setup);
+	dev = alloc_etherdev(sizeof(struct sb1000_private));
 	if (!dev) {
 		error = -ENOMEM;
 		goto out_release_regions;
 	}
+
+	/* New-style flags. */
+	/* This seems bogus */
+	dev->flags = IFF_POINTOPOINT|IFF_NOARP;
+
 	SET_MODULE_OWNER(dev);
 
 	if (sb1000_debug > 0)

_


  reply	other threads:[~2003-05-14 17:17 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-14  8:29 2.5.69-mm5 Andrew Morton
2003-05-14 12:33 ` 2.5.69-mm5 Ed Tomlinson
2003-05-14 14:47 ` 2.5.69-mm5: sb1000.c: undefined reference to `alloc_netdev' Adrian Bunk
2003-05-14 17:31   ` Andrew Morton [this message]
2003-05-14 18:26     ` Alan Cox
2003-05-14 19:41       ` Andrew Morton
2003-05-15  1:49         ` David S. Miller
2003-05-14 21:45 ` 2.5.69-mm5: CONFIG_ACPI_SLEEP compile error Adrian Bunk
2003-05-14 22:51   ` Pavel Machek
2003-05-15  9:46     ` mikpe
2003-05-15 14:52       ` Pavel Machek
2003-05-15  9:29   ` mikpe
2003-05-15  8:59 ` 2.5.69-mm5 Helge Hafting
2003-05-15 19:51 ` 2.5.69-mm5 William Lee Irwin III

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=20030514103115.465d18a8.akpm@digeo.com \
    --to=akpm@digeo.com \
    --cc=bunk@fs.tum.de \
    --cc=fventuri@mediaone.net \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-net@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®