From: Manuel Estrada Sainz <ranty@ranty.pantax.net>
To: Andrew Morton <akpm@osdl.org>,
LKML <linux-kernel@vger.kernel.org>,
Dmitry Torokhov <dtor_core@ameritech.net>,
jt@hpl.hp.com, Simon Kelley <simon@thekelleys.org.uk>
Subject: Re: [PATCH] request_firmware(): fixes and polishing.
Date: Wed, 25 Feb 2004 02:34:49 +0100 [thread overview]
Message-ID: <1077672889458@kroah.com> (raw)
In-Reply-To: <10776728893691@kroah.com>
Based on patch and suggestions from Dmitry Torokhov
Changelog:
- Don't remove attributes, they should be gone automatically.
Index: linux-2.5/drivers/base/firmware_class.c
===================================================================
--- linux-2.5.orig/drivers/base/firmware_class.c 2004-01-06 13:40:58.000000000 +0100
+++ linux-2.5/drivers/base/firmware_class.c 2004-01-06 13:41:07.000000000 +0100
@@ -339,13 +339,13 @@
goto out;
fw_priv = class_get_devdata(class_dev);
- fw_priv->fw = fw;
+ fw_priv->fw = fw;
retval = sysfs_create_bin_file(&class_dev->kobj, &fw_priv->attr_data);
if (retval) {
printk(KERN_ERR "%s: sysfs_create_bin_file failed\n",
__FUNCTION__);
- goto error_unreg_class_dev;
+ goto error_unreg;
}
retval = class_device_create_file(class_dev,
@@ -353,28 +353,17 @@
if (retval) {
printk(KERN_ERR "%s: class_device_create_file failed\n",
__FUNCTION__);
- goto error_remove_data;
+ goto error_unreg;
}
*class_dev_p = class_dev;
goto out;
-error_remove_data:
- sysfs_remove_bin_file(&class_dev->kobj, &fw_priv->attr_data);
-error_unreg_class_dev:
+error_unreg:
class_device_unregister(class_dev);
out:
return retval;
}
-static void
-fw_remove_class_device(struct class_device *class_dev)
-{
- struct firmware_priv *fw_priv = class_get_devdata(class_dev);
-
- class_device_remove_file(class_dev, &class_device_attr_loading);
- sysfs_remove_bin_file(&class_dev->kobj, &fw_priv->attr_data);
- class_device_unregister(class_dev);
-}
/**
* request_firmware: - request firmware to hotplug and wait for it
@@ -433,7 +422,7 @@
}
fw_priv->fw = NULL;
up(&fw_lock);
- fw_remove_class_device(class_dev);
+ class_device_unregister(class_dev);
goto out;
error_kfree_fw:
@@ -569,7 +558,6 @@
static void __exit
firmware_class_exit(void)
{
- class_remove_file(&firmware_class, &class_attr_timeout);
class_unregister(&firmware_class);
}
next prev parent reply other threads:[~2004-02-25 1:38 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <ranty@debian.org>
2004-02-25 1:34 ` [PATCH] request_firmware(): fixes and polishing Manuel Estrada Sainz
2004-02-25 1:34 ` Manuel Estrada Sainz
2004-02-25 1:34 ` Manuel Estrada Sainz
2004-02-25 1:34 ` Manuel Estrada Sainz
2004-02-25 1:34 ` Manuel Estrada Sainz
2004-02-25 1:34 ` Manuel Estrada Sainz
2004-02-25 1:34 ` Manuel Estrada Sainz
2004-02-25 1:34 ` Manuel Estrada Sainz [this message]
2004-02-25 19:47 ` Jean Tourrilhes
2004-02-25 23:40 ` Manuel Estrada Sainz
2004-02-29 6:30 ` Dmitry Torokhov
2004-02-29 6:32 ` [PATCH 1/2] Pin firmware module (was Re: [PATCH] request_firmware(): fixes and polishing.) Dmitry Torokhov
2004-02-29 6:34 ` [PATCH 2/2] Delay firmware hotplug event " Dmitry Torokhov
2004-01-07 1:23 [PATCH] request_firmware(): fixes and polishing 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=1077672889458@kroah.com \
--to=ranty@ranty.pantax.net \
--cc=akpm@osdl.org \
--cc=dtor_core@ameritech.net \
--cc=jt@hpl.hp.com \
--cc=linux-kernel@vger.kernel.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