From: Manuel Estrada Sainz <ranty@debian.org>
To: Patrick Mochel <mochel@osdl.org>
Cc: Greg KH <greg@kroah.com>, LKML <linux-kernel@vger.kernel.org>,
Simon Kelley <simon@thekelleys.org.uk>,
Alan Cox <alan@lxorguk.ukuu.org.uk>,
jt@hpl.hp.com, Pavel Roskin <proski@gnu.org>,
Oliver Neukum <oliver@neukum.org>,
David Gibson <david@gibson.dropbear.id.au>
Subject: Re: [PATCH] Re: request_firmware() hotplug interface, third round and a halve
Date: Thu, 22 May 2003 18:34:48 +0200 [thread overview]
Message-ID: <20030522163448.GA17004@ranty.ddts.net> (raw)
In-Reply-To: <Pine.LNX.4.44.0305220911290.5889-100000@cherise>
[-- Attachment #1: Type: text/plain, Size: 1266 bytes --]
On Thu, May 22, 2003 at 09:14:26AM -0700, Patrick Mochel wrote:
>
> I don't have any problems with the interface, and am ok with the driver
> core and sysfs changes. I have the sysfs binary file patch, but would you
> mind sending me the class device release() patch separately?
Sorry. Since it is small I'll simply split class-casts+release.diff and
attach both pieces just in case.
> Also, what about just creating a drivers/firmware/ directory (or
> drivers/base/firmware/) for the core code?
Making a directory for a single source file seams a little overkill,
although at some point could be interesting to have all firmware images
in the kernel on the same directory to be copied to initramfs or
elsewhere.
For now I don't think it is worth it's own directory, but I don't
really care as long as the functionality is there.
If I had to choose I would take drivers/base/firmware/
Thanks
Manuel
--
--- Manuel Estrada Sainz <ranty@debian.org>
<ranty@bigfoot.com>
<ranty@users.sourceforge.net>
------------------------ <manuel.estrada@hispalinux.es> -------------------
Let us have the serenity to accept the things we cannot change, courage to
change the things we can, and wisdom to know the difference.
[-- Attachment #2: class-casts.diff --]
[-- Type: text/plain, Size: 1207 bytes --]
diff --exclude=CVS -urN linux-2.5.orig/drivers/base/base.h linux-2.5.mine/drivers/base/base.h
--- linux-2.5.orig/drivers/base/base.h 2003-05-21 17:38:39.000000000 +0200
+++ linux-2.5.mine/drivers/base/base.h 2003-05-21 10:25:09.000000000 +0200
@@ -4,3 +4,12 @@
extern int bus_add_driver(struct device_driver *);
extern void bus_remove_driver(struct device_driver *);
+static inline struct class_device *to_class_dev(struct kobject *obj)
+{
+ return container_of(obj,struct class_device,kobj);
+}
+static inline
+struct class_device_attribute *to_class_dev_attr(struct attribute *_attr)
+{
+ return container_of(_attr,struct class_device_attribute,attr);
+}
diff --exclude=CVS -urN linux-2.5.orig/drivers/base/class.c linux-2.5.mine/drivers/base/class.c
--- linux-2.5.orig/drivers/base/class.c 2003-05-21 17:38:39.000000000 +0200
+++ linux-2.5.mine/drivers/base/class.c 2003-05-22 16:51:46.000000000 +0200
@@ -148,9 +148,6 @@
}
-#define to_class_dev(obj) container_of(obj,struct class_device,kobj)
-#define to_class_dev_attr(_attr) container_of(_attr,struct class_device_attribute,attr)
-
static ssize_t
class_device_attr_show(struct kobject * kobj, struct attribute * attr,
char * buf)
[-- Attachment #3: class-device-release.diff --]
[-- Type: text/plain, Size: 1076 bytes --]
diff --exclude=CVS -urN linux-2.5.orig/drivers/base/class.c linux-2.5.mine/drivers/base/class.c
--- linux-2.5.orig/drivers/base/class.c 2003-05-21 17:38:39.000000000 +0200
+++ linux-2.5.mine/drivers/base/class.c 2003-05-22 16:51:46.000000000 +0200
@@ -182,7 +179,15 @@
.store = class_device_attr_store,
};
+static void class_dev_release(struct kobject * kobj)
+{
+ struct class_device *class_dev = to_class_dev(kobj);
+ if (class_dev->release)
+ class_dev->release(class_dev);
+}
+
static struct kobj_type ktype_class_device = {
+ .release = &class_dev_release,
.sysfs_ops = &class_dev_sysfs_ops,
};
diff --exclude=CVS -urN linux-2.5.orig/include/linux/device.h linux-2.5.mine/include/linux/device.h
--- linux-2.5.orig/include/linux/device.h 2003-05-22 13:05:16.000000000 +0200
+++ linux-2.5.mine/include/linux/device.h 2003-05-22 12:05:45.000000000 +0200
@@ -204,6 +204,7 @@
void * class_data; /* class-specific data */
char class_id[BUS_ID_SIZE]; /* unique to this class */
+ void (*release)(struct class_device * class_dev);
};
static inline void *
next prev parent reply other threads:[~2003-05-22 16:22 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-17 22:19 request_firmware() hotplug interface, third round and a halve Manuel Estrada Sainz
2003-05-21 7:23 ` Greg KH
2003-05-21 7:44 ` David Gibson
2003-05-21 18:36 ` Manuel Estrada Sainz
2003-05-21 18:34 ` Manuel Estrada Sainz
2003-05-21 19:03 ` Greg KH
2003-05-21 18:52 ` [PATCH] " Manuel Estrada Sainz
2003-05-21 20:07 ` Greg KH
2003-05-22 15:31 ` Manuel Estrada Sainz
2003-05-22 16:14 ` Patrick Mochel
2003-05-22 16:34 ` Manuel Estrada Sainz [this message]
2003-05-22 16:38 ` Patrick Mochel
2003-05-22 16:43 ` Manuel Estrada Sainz
2003-05-22 16:51 ` Patrick Mochel
2003-05-22 17:01 ` Manuel Estrada Sainz
2003-05-22 17:03 ` Patrick Mochel
2003-05-22 17:57 ` Simon Kelley
2003-05-22 18:15 ` Manuel Estrada Sainz
2003-05-21 21:51 ` Sam Ravnborg
2003-05-22 6:26 ` Manuel Estrada Sainz
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=20030522163448.GA17004@ranty.ddts.net \
--to=ranty@debian.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=david@gibson.dropbear.id.au \
--cc=greg@kroah.com \
--cc=jt@hpl.hp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mochel@osdl.org \
--cc=oliver@neukum.org \
--cc=proski@gnu.org \
--cc=simon@thekelleys.org.uk \
/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