All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Dhammika Pathirana" <dhammikap@millenniumit.com>
To: linux-kernel <linux-kernel@vger.kernel.org>
Subject: [PATCH] acorn_request_region fix 2.5.48
Date: Mon, 25 Nov 2002 11:43:08 +0600	[thread overview]
Message-ID: <3DE1B86C.30505@millenniumit.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1592 bytes --]

Hi,

Following patch is to fix acorn request region failure. Pls apply.

dhammika

-----------------

diff -urN ./linux-2.5.48/drivers/acorn/net/ether1.c 
./linux/drivers/acorn/net/ether1.c
--- ./linux-2.5.48/drivers/acorn/net/ether1.c   Mon Nov 18 10:29:47 2002
+++ ./linux/drivers/acorn/net/ether1.c  Mon Nov 25 11:19:52 2002
@@ -1035,13 +1035,20 @@
         /*
          * these will not fail - the nature of the bus ensures this
          */
-       request_region(dev->base_addr, 16, dev->name);
-       request_region(dev->base_addr + 0x800, 4096, dev->name);
+       if(!request_region(dev->base_addr, 16, dev->name)){
+               ret = -EBUSY;
+               goto release1;
+       }
+
+       if(!request_region(dev->base_addr + 0x800, 4096, dev->name)){
+               ret = -EBUSY;
+               goto release2;
+       }

         priv = (struct ether1_priv *)dev->priv;
         if ((priv->bus_type = ether1_reset(dev)) == 0) {
                 ret = -ENODEV;
-               goto release;
+               goto release3;
         }

         printk(KERN_INFO "%s: ether1 in slot %d, ",
@@ -1054,7 +1061,7 @@

         if (ether1_init_2(dev)) {
                 ret = -ENODEV;
-               goto release;
+               goto release3;
         }

         dev->open               = ether1_open;
@@ -1069,9 +1076,11 @@
         ecard_set_drvdata(ec, dev);
         return 0;

-release:
+release3:
         release_region(dev->base_addr, 16);
+release2:
         release_region(dev->base_addr + 0x800, 4096);
+release1:
         unregister_netdev(dev);

-----------------

[-- Attachment #2: Disclaimer_Message.txt --]
[-- Type: text/plain, Size: 341 bytes --]

----------------------------------------- (on postoffice)

The information contained in this email is confidential and is meant to be read only by the person to whom it is addressed.Please visit http://www.millenniumit.com/legal/email.htm to read the entire confidentiality clause.

---------------------------------------------------------

             reply	other threads:[~2002-11-25  5:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-25  5:43 Dhammika Pathirana [this message]
2002-12-30 15:22 ` [PATCH] acorn_request_region fix 2.5.48 Russell King

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=3DE1B86C.30505@millenniumit.com \
    --to=dhammikap@millenniumit.com \
    --cc=linux-kernel@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 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.