diff options
author | Anton Altaparmakov <aia21@hera.kernel.org> | 2005-09-09 08:19:10 -0700 |
---|---|---|
committer | Anton Altaparmakov <aia21@hera.kernel.org> | 2005-09-09 08:19:10 -0700 |
commit | ddcc95963449d028b16d9b9fe50f6e91ce7d9e81 (patch) | |
tree | aaf0392346a18b3e232ddeb5db3c4e917f7ca686 /drivers/w1/w1_netlink.c | |
parent | 223176bc722a7bf519904180e956292ae1d1e819 (diff) | |
parent | 5f5024130287a9467a41b9f94ec170958ae45cbd (diff) |
Merge branch 'master' of /pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'drivers/w1/w1_netlink.c')
-rw-r--r-- | drivers/w1/w1_netlink.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/drivers/w1/w1_netlink.c b/drivers/w1/w1_netlink.c index e7b774423dd..328645da797 100644 --- a/drivers/w1/w1_netlink.c +++ b/drivers/w1/w1_netlink.c @@ -57,10 +57,36 @@ void w1_netlink_send(struct w1_master *dev, struct w1_netlink_msg *msg) nlmsg_failure: return; } + +int dev_init_netlink(struct w1_master *dev) +{ + dev->nls = netlink_kernel_create(NETLINK_W1, 1, NULL, THIS_MODULE); + if (!dev->nls) { + printk(KERN_ERR "Failed to create new netlink socket(%u) for w1 master %s.\n", + NETLINK_W1, dev->dev.bus_id); + } + + return 0; +} + +void dev_fini_netlink(struct w1_master *dev) +{ + if (dev->nls && dev->nls->sk_socket) + sock_release(dev->nls->sk_socket); +} #else #warning Netlink support is disabled. Please compile with NET support enabled. void w1_netlink_send(struct w1_master *dev, struct w1_netlink_msg *msg) { } + +int dev_init_netlink(struct w1_master *dev) +{ + return 0; +} + +void dev_fini_netlink(struct w1_master *dev) +{ +} #endif |