From: Greg KH <greg@kroah.com>
To: linux-kernel@vger.kernel.org
Cc: Evgeniy Polyakov <johnpol@2ka.mipt.ru>,
Greg Kroah-Hartman <gregkh@suse.de>
Subject: [PATCH 9/14] [PATCH] W1: cleanups
Date: Thu, 22 Jun 2006 11:27:13 -0700 [thread overview]
Message-ID: <11510008691087-git-send-email-greg@kroah.com> (raw)
In-Reply-To: <11510008662311-git-send-email-greg@kroah.com>
From: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Nice cleanup spotted by Adrian Bunk, which was lost due to moving to the
completely new functionality.
Shame-shame-shame on me.
Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/w1/w1.c | 6 ++++--
drivers/w1/w1.h | 10 ++++++++++
drivers/w1/w1_int.c | 12 +-----------
3 files changed, 15 insertions(+), 13 deletions(-)
diff --git a/drivers/w1/w1.c b/drivers/w1/w1.c
index 420be14..b41366a 100644
--- a/drivers/w1/w1.c
+++ b/drivers/w1/w1.c
@@ -214,11 +214,12 @@ struct device w1_master_device = {
.release = &w1_master_release
};
-struct device_driver w1_slave_driver = {
+static struct device_driver w1_slave_driver = {
.name = "w1_slave_driver",
.bus = &w1_bus_type,
};
+#if 0
struct device w1_slave_device = {
.parent = NULL,
.bus = &w1_bus_type,
@@ -226,6 +227,7 @@ struct device w1_slave_device = {
.driver = &w1_slave_driver,
.release = &w1_slave_release
};
+#endif /* 0 */
static ssize_t w1_master_attribute_show_name(struct device *dev, struct device_attribute *attr, char *buf)
{
@@ -383,7 +385,7 @@ int w1_create_master_attributes(struct w
return sysfs_create_group(&master->dev.kobj, &w1_master_defattr_group);
}
-void w1_destroy_master_attributes(struct w1_master *master)
+static void w1_destroy_master_attributes(struct w1_master *master)
{
sysfs_remove_group(&master->dev.kobj, &w1_master_defattr_group);
}
diff --git a/drivers/w1/w1.h b/drivers/w1/w1.h
index 6caccfc..3828f39 100644
--- a/drivers/w1/w1.h
+++ b/drivers/w1/w1.h
@@ -213,6 +213,16 @@ static inline struct w1_master* dev_to_w
return container_of(dev, struct w1_master, dev);
}
+extern struct device_driver w1_master_driver;
+extern struct bus_type w1_bus_type;
+extern struct device w1_master_device;
+extern int w1_max_slave_count;
+extern int w1_max_slave_ttl;
+extern struct list_head w1_masters;
+extern struct mutex w1_mlock;
+
+extern int w1_process(void *);
+
#endif /* __KERNEL__ */
#endif /* __W1_H */
diff --git a/drivers/w1/w1_int.c b/drivers/w1/w1_int.c
index 24e7c10..475996c 100644
--- a/drivers/w1/w1_int.c
+++ b/drivers/w1/w1_int.c
@@ -30,16 +30,6 @@ #include "w1_netlink.h"
static u32 w1_ids = 1;
-extern struct device_driver w1_master_driver;
-extern struct bus_type w1_bus_type;
-extern struct device w1_master_device;
-extern int w1_max_slave_count;
-extern int w1_max_slave_ttl;
-extern struct list_head w1_masters;
-extern struct mutex w1_mlock;
-
-extern int w1_process(void *);
-
static struct w1_master * w1_alloc_dev(u32 id, int slave_count, int slave_ttl,
struct device_driver *driver,
struct device *device)
@@ -96,7 +86,7 @@ static struct w1_master * w1_alloc_dev(u
return dev;
}
-void w1_free_dev(struct w1_master *dev)
+static void w1_free_dev(struct w1_master *dev)
{
device_unregister(&dev->dev);
}
--
1.4.0
next prev parent reply other threads:[~2006-06-22 18:31 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-22 18:26 [GIT PATCH] W1 patches for 2.6.17 Greg KH
2006-06-22 18:27 ` [PATCH 1/14] [PATCH] w1: Added default generic read/write operations Greg KH
2006-06-22 18:27 ` [PATCH 2/14] [PATCH] w1: Replace dscore and ds_w1_bridge with ds2490 driver Greg KH
2006-06-22 18:27 ` [PATCH 3/14] [PATCH] w1: Userspace communication protocol over connector Greg KH
2006-06-22 18:27 ` [PATCH 4/14] [PATCH] w1: Move w1-connector definitions into linux/include/connector.h Greg KH
2006-06-22 18:27 ` [PATCH 5/14] [PATCH] w1: netlink: Mark netlink group 1 as unused Greg KH
2006-06-22 18:27 ` [PATCH 6/14] [PATCH] w1: Make w1 connector notifications depend on connector Greg KH
2006-06-22 18:27 ` [PATCH 7/14] [PATCH] w1: Use mutexes instead of semaphores Greg KH
2006-06-22 18:27 ` [PATCH 8/14] [PATCH] w1 exports Greg KH
2006-06-22 18:27 ` Greg KH [this message]
2006-06-22 18:27 ` [PATCH 10/14] [PATCH] W1: possible cleanups Greg KH
2006-06-22 18:27 ` [PATCH 11/14] [PATCH] W1: fix dependencies of W1_SLAVE_DS2433_CRC Greg KH
2006-06-22 18:27 ` [PATCH 12/14] [PATCH] drivers/w1/w1.c: fix a compile error Greg KH
2006-06-22 18:27 ` [PATCH 13/14] [PATCH] w1: clean up W1_CON dependency Greg KH
2006-06-22 18:27 ` [PATCH 14/14] [PATCH] w1: warning fix 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=11510008691087-git-send-email-greg@kroah.com \
--to=greg@kroah.com \
--cc=gregkh@suse.de \
--cc=johnpol@2ka.mipt.ru \
--cc=linux-kernel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.