From: Douglas Gilbert <dougg@torque.net>
To: James Bottomley <James.Bottomley@steeleye.com>
Cc: Andries.Brouwer@cwi.nl, torvalds@transmeta.com,
linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org
Subject: Re: [PATCH] scsi/hosts.c device_register fix
Date: Fri, 29 Nov 2002 09:53:28 +1100 [thread overview]
Message-ID: <3DE69E68.7070304@torque.net> (raw)
In-Reply-To: 200211281657.gASGve102802@localhost.localdomain
[-- Attachment #1: Type: text/plain, Size: 1098 bytes --]
James Bottomley wrote:
> Actually, the patch is wrong. It will wreak havoc with SCSI's use of sysfs.
> The device_register has to be done in scsi_add_host, which is called after all
> the driver specific sysfs setup has been done. The correct fix is to move the
> corresponding device_unregister into scsi_remove_host so that they match.
>
> I've attached it below. I'll also commit it to the scsi-misc-2.5 BK tree.
>
> James
>
>
>
> ------------------------------------------------------------------------
>
> ===== hosts.c 1.31 vs edited =====
> --- 1.31/drivers/scsi/hosts.c Sun Nov 17 15:47:02 2002
> +++ edited/hosts.c Sat Nov 23 17:25:57 2002
> @@ -295,6 +295,8 @@
> kfree(sdev);
> }
>
> + device_unregister(&shost->host_driverfs_dev);
> +
> return 0;
> }
>
> @@ -348,7 +350,6 @@
>
> /* Cleanup proc and driverfs */
> scsi_proc_host_rm(shost);
> - device_unregister(&shost->host_driverfs_dev);
>
> kfree(shost);
> }
James,
The above patch is a bit noisy when applied to lk 2.5.50 .
Attached is the same patch (I hope) which applies cleanly.
Doug Gilbert
[-- Attachment #2: dev_reg_2550.diff --]
[-- Type: text/plain, Size: 444 bytes --]
--- linux/drivers/scsi/hosts.c 2002-11-29 09:27:35.000000000 +1100
+++ linux/drivers/scsi/hosts.c2550jb 2002-11-29 09:45:28.000000000 +1100
@@ -297,6 +297,8 @@
scsi_free_sdev(list_entry(le, Scsi_Device, siblings));
}
+ device_unregister(&shost->host_driverfs_dev);
+
return 0;
}
@@ -348,7 +350,6 @@
/* Cleanup proc and driverfs */
scsi_proc_host_rm(shost);
- device_unregister(&shost->host_driverfs_dev);
kfree(shost);
}
next prev parent reply other threads:[~2002-11-28 23:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-28 16:47 [PATCH] scsi/hosts.c device_register fix Andries.Brouwer
2002-11-28 16:57 ` James Bottomley
2002-11-28 22:53 ` Douglas Gilbert [this message]
-- strict thread matches above, loose matches on Subject: below --
2002-11-28 17:18 Andries.Brouwer
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=3DE69E68.7070304@torque.net \
--to=dougg@torque.net \
--cc=Andries.Brouwer@cwi.nl \
--cc=James.Bottomley@steeleye.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=torvalds@transmeta.com \
/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