aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2010-08-31 20:06:30 +0000
committerGabor Juhos <juhosg@openwrt.org>2010-08-31 20:06:30 +0000
commita4aa4e3973c6bfde1515d7cab29b5e7ec930bc3c (patch)
tree2451aafc4b260f18020e4f465b7397ff4a30b5d8
parent6c1d3b0a79b659e47f8f826f0bc5f197706e949c (diff)
downloadupstream-a4aa4e3973c6bfde1515d7cab29b5e7ec930bc3c.tar.gz
upstream-a4aa4e3973c6bfde1515d7cab29b5e7ec930bc3c.tar.bz2
upstream-a4aa4e3973c6bfde1515d7cab29b5e7ec930bc3c.zip
package/button-hotplug: use brodcast_uevent
SVN-Revision: 22859
-rw-r--r--package/button-hotplug/Makefile4
-rw-r--r--package/button-hotplug/src/button-hotplug.c10
2 files changed, 5 insertions, 9 deletions
diff --git a/package/button-hotplug/Makefile b/package/button-hotplug/Makefile
index 35791420f3..68f42210e1 100644
--- a/package/button-hotplug/Makefile
+++ b/package/button-hotplug/Makefile
@@ -1,5 +1,5 @@
#
-# Copyright (C) 2008 OpenWrt.org
+# Copyright (C) 2008-2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=button-hotplug
-PKG_RELEASE:=2
+PKG_RELEASE:=3
include $(INCLUDE_DIR)/package.mk
diff --git a/package/button-hotplug/src/button-hotplug.c b/package/button-hotplug/src/button-hotplug.c
index 0259a3fbcd..4a8c4a88ed 100644
--- a/package/button-hotplug/src/button-hotplug.c
+++ b/package/button-hotplug/src/button-hotplug.c
@@ -21,10 +21,10 @@
#include <linux/workqueue.h>
#include <linux/skbuff.h>
#include <linux/netlink.h>
-#include <net/sock.h>
+#include <linux/kobject.h>
#define DRV_NAME "button-hotplug"
-#define DRV_VERSION "0.4.0"
+#define DRV_VERSION "0.4.1"
#define DRV_DESC "Button Hotplug driver"
#define BH_SKB_SIZE 2048
@@ -64,7 +64,6 @@ struct bh_map {
const char *name;
};
-extern struct sock *uevent_sock;
extern u64 uevent_next_seqnum(void);
#define BH_MAP(_code, _name) \
@@ -160,9 +159,6 @@ static void button_hotplug_work(struct work_struct *work)
struct bh_event *event = container_of(work, struct bh_event, work);
int ret = 0;
- if (!uevent_sock)
- goto out_free_event;
-
event->skb = alloc_skb(BH_SKB_SIZE, GFP_KERNEL);
if (!event->skb)
goto out_free_event;
@@ -176,7 +172,7 @@ static void button_hotplug_work(struct work_struct *work)
goto out_free_skb;
NETLINK_CB(event->skb).dst_group = 1;
- netlink_broadcast(uevent_sock, event->skb, 0, 1, GFP_KERNEL);
+ broadcast_uevent(event->skb, 0, 1, GFP_KERNEL);
out_free_skb:
if (ret) {