[PATCH] w1: Core cleanup 1/2

From: Greg KH
Date: Fri Mar 04 2005 - 16:48:13 EST


ChangeSet 1.2082, 2005/03/02 16:58:52-08:00, johnpol@xxxxxxxxxxx

[PATCH] w1: Core cleanup 1/2

Trivial cleanups, mostly static/non static, removed unneded exports.
It fuzzes a bit, sorry, patch is quite old.

Signed-off-by: Evgeniy Polyakov <johnpol@xxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <greg@xxxxxxxxx>


drivers/w1/w1.c | 23 ++++++++++-------------
drivers/w1/w1_family.c | 2 --
drivers/w1/w1_int.c | 3 ---
3 files changed, 10 insertions(+), 18 deletions(-)


diff -Nru a/drivers/w1/w1.c b/drivers/w1/w1.c
--- a/drivers/w1/w1.c 2005-03-04 12:38:12 -08:00
+++ b/drivers/w1/w1.c 2005-03-04 12:38:12 -08:00
@@ -19,8 +19,6 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/

-#include <asm/atomic.h>
-
#include <linux/delay.h>
#include <linux/kernel.h>
#include <linux/module.h>
@@ -33,6 +31,8 @@
#include <linux/slab.h>
#include <linux/sched.h>

+#include <asm/atomic.h>
+
#include "w1.h"
#include "w1_io.h"
#include "w1_log.h"
@@ -100,7 +100,7 @@
return sprintf(buf, "No family registered.\n");
}

-struct bus_type w1_bus_type = {
+static struct bus_type w1_bus_type = {
.name = "w1",
.match = w1_master_match,
};
@@ -138,7 +138,7 @@
.show = &w1_default_read_name,
};

-ssize_t w1_master_attribute_show_name(struct device *dev, char *buf)
+static ssize_t w1_master_attribute_show_name(struct device *dev, char *buf)
{
struct w1_master *md = container_of (dev, struct w1_master, dev);
ssize_t count;
@@ -153,7 +153,7 @@
return count;
}

-ssize_t w1_master_attribute_show_pointer(struct device *dev, char *buf)
+static ssize_t w1_master_attribute_show_pointer(struct device *dev, char *buf)
{
struct w1_master *md = container_of(dev, struct w1_master, dev);
ssize_t count;
@@ -167,14 +167,14 @@
return count;
}

-ssize_t w1_master_attribute_show_timeout(struct device *dev, char *buf)
+static ssize_t w1_master_attribute_show_timeout(struct device *dev, char *buf)
{
ssize_t count;
count = sprintf(buf, "%d\n", w1_timeout);
return count;
}

-ssize_t w1_master_attribute_show_max_slave_count(struct device *dev, char *buf)
+static ssize_t w1_master_attribute_show_max_slave_count(struct device *dev, char *buf)
{
struct w1_master *md = container_of(dev, struct w1_master, dev);
ssize_t count;
@@ -188,7 +188,7 @@
return count;
}

-ssize_t w1_master_attribute_show_attempts(struct device *dev, char *buf)
+static ssize_t w1_master_attribute_show_attempts(struct device *dev, char *buf)
{
struct w1_master *md = container_of(dev, struct w1_master, dev);
ssize_t count;
@@ -202,7 +202,7 @@
return count;
}

-ssize_t w1_master_attribute_show_slave_count(struct device *dev, char *buf)
+static ssize_t w1_master_attribute_show_slave_count(struct device *dev, char *buf)
{
struct w1_master *md = container_of(dev, struct w1_master, dev);
ssize_t count;
@@ -216,7 +216,7 @@
return count;
}

-ssize_t w1_master_attribute_show_slaves(struct device *dev, char *buf)
+static ssize_t w1_master_attribute_show_slaves(struct device *dev, char *buf)

{
struct w1_master *md = container_of(dev, struct w1_master, dev);
@@ -839,6 +839,3 @@

module_init(w1_init);
module_exit(w1_fini);
-
-EXPORT_SYMBOL(w1_create_master_attributes);
-EXPORT_SYMBOL(w1_destroy_master_attributes);
diff -Nru a/drivers/w1/w1_family.c b/drivers/w1/w1_family.c
--- a/drivers/w1/w1_family.c 2005-03-04 12:38:12 -08:00
+++ b/drivers/w1/w1_family.c 2005-03-04 12:38:12 -08:00
@@ -143,8 +143,6 @@

EXPORT_SYMBOL(w1_family_get);
EXPORT_SYMBOL(w1_family_put);
-EXPORT_SYMBOL(__w1_family_get);
-EXPORT_SYMBOL(__w1_family_put);
EXPORT_SYMBOL(w1_family_registered);
EXPORT_SYMBOL(w1_unregister_family);
EXPORT_SYMBOL(w1_register_family);
diff -Nru a/drivers/w1/w1_int.c b/drivers/w1/w1_int.c
--- a/drivers/w1/w1_int.c 2005-03-04 12:38:12 -08:00
+++ b/drivers/w1/w1_int.c 2005-03-04 12:38:12 -08:00
@@ -217,8 +217,5 @@
__w1_remove_master_device(dev);
}

-EXPORT_SYMBOL(w1_alloc_dev);
-EXPORT_SYMBOL(w1_free_dev);
EXPORT_SYMBOL(w1_add_master_device);
EXPORT_SYMBOL(w1_remove_master_device);
-EXPORT_SYMBOL(__w1_remove_master_device);

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/