linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Patrick Mochel <mochel@osdl.org>, linux-kernel@vger.kernel.org
Cc: hannal@us.ibm.com, andmike@us.ibm.com
Subject: [RFC] Device class rework [3/5]
Date: Tue, 22 Apr 2003 13:58:27 -0700	[thread overview]
Message-ID: <20030422205827.GD4701@kroah.com> (raw)
In-Reply-To: <20030422205749.GC4701@kroah.com>

On Tue, Apr 22, 2003 at 01:55:45PM -0700, Greg KH wrote:
>  - Crude patches to the scsi core to get it to build properly.  This
>    patch is not correct, but needed if your machines have scsi.  Mike
>    Anderson has said he will fix up the scsi code based on these core
>    changes.


diff -Nru a/drivers/scsi/hosts.c b/drivers/scsi/hosts.c
--- a/drivers/scsi/hosts.c	Tue Apr 22 13:08:01 2003
+++ b/drivers/scsi/hosts.c	Tue Apr 22 13:08:01 2003
@@ -294,7 +294,7 @@
 			sht->info ? sht->info(shost) : sht->name);
 
 	if (dev) {
-		dev->class_data = shost;
+//		dev->class_data = shost;
 		shost->host_gendev = dev;
 	}
 
diff -Nru a/drivers/scsi/hosts.h b/drivers/scsi/hosts.h
--- a/drivers/scsi/hosts.h	Tue Apr 22 13:07:58 2003
+++ b/drivers/scsi/hosts.h	Tue Apr 22 13:07:58 2003
@@ -495,7 +495,8 @@
         __attribute__ ((aligned (sizeof(unsigned long))));
 };
 
-#define	to_scsi_host(d)	d->class_data
+//#define	to_scsi_host(d)	d->class_data
+#define	to_scsi_host(d)	d->driver_data	// Major breakage, but we compile now...
 	
 /*
  * These two functions are used to allocate and free a pseudo device
@@ -607,7 +608,7 @@
 extern int scsi_upper_driver_register(struct Scsi_Device_Template *);
 extern void scsi_upper_driver_unregister(struct Scsi_Device_Template *);
 
-extern struct device_class shost_devclass;
+extern struct class shost_devclass;
 
 #endif
 /*
diff -Nru a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c
--- a/drivers/scsi/scsi_debug.c	Tue Apr 22 13:07:57 2003
+++ b/drivers/scsi/scsi_debug.c	Tue Apr 22 13:07:57 2003
@@ -183,7 +183,7 @@
 	.name 		= sdebug_proc_name,
 	.probe          = sdebug_driver_probe,
 	.remove         = sdebug_driver_remove,
-	.devclass 	= &shost_devclass,
+//	.devclass 	= &shost_devclass,
 };
 
 static const int check_condition_result = 
diff -Nru a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c
--- a/drivers/scsi/scsi_sysfs.c	Tue Apr 22 13:08:01 2003
+++ b/drivers/scsi/scsi_sysfs.c	Tue Apr 22 13:08:01 2003
@@ -95,10 +95,8 @@
 	device_remove_file(dev, &dev_attr_class_name);
 }
 
-struct device_class shost_devclass = {
+struct class shost_devclass = {
 	.name		= "scsi-host",
-	.add_device	= scsi_host_class_add_dev,
-	.remove_device	= scsi_host_class_rm_dev,
 };
 
 /**
@@ -136,14 +134,14 @@
 int scsi_sysfs_register(void)
 {
 	bus_register(&scsi_bus_type);
-	devclass_register(&shost_devclass);
+	class_register(&shost_devclass);
 
 	return 0;
 }
 
 void scsi_sysfs_unregister(void)
 {
-	devclass_unregister(&shost_devclass);
+	class_unregister(&shost_devclass);
 	bus_unregister(&scsi_bus_type);
 }
 

  reply	other threads:[~2003-04-22 20:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-22 20:55 [RFC] Device class rework [0/5] Greg KH
2003-04-22 20:57 ` [RFC] Device class rework [1/5] Greg KH
2003-04-22 20:57   ` [RFC] Device class rework [2/5] Greg KH
2003-04-22 20:58     ` Greg KH [this message]
2003-04-22 20:59       ` [RFC] Device class rework [4/5] Greg KH
2003-04-22 20:59         ` [RFC] Device class rework [5/5] Greg KH
2003-04-23  0:59 ` [RFC] Device class rework [0/5] Hanna Linder
2003-04-23  1:54   ` Greg KH
2003-04-23 16:18     ` Hanna Linder
2003-04-23 16:23       ` Greg KH

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=20030422205827.GD4701@kroah.com \
    --to=greg@kroah.com \
    --cc=andmike@us.ibm.com \
    --cc=hannal@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mochel@osdl.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;
as well as URLs for NNTP newsgroup(s).