summaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-05-19 18:07:25 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2016-05-19 18:07:25 -0700
commite9ad9b9bd3a3b95c89a29b2a197476e662db4233 (patch)
tree0b5e6c09953edc1a0bfab0b2aa964b80bceb5efd /Documentation
parent78975f23cba0cd195db01cdbd6eb48138a655890 (diff)
parent9f8036643dd9609b329aa1b89c9a95981e9ba62f (diff)
Merge tag 'docs-for-linus' of git://git.lwn.net/linux
Pull Documentation updates from Jon Corbet: "A bit busier this time around. The most interesting thing (IMO) this time around is some beginning infrastructural work to allow documents to be written using restructured text. Maybe someday, in a galaxy far far away, we'll be able to eliminate the DocBook dependency and have a much better integrated set of kernel docs. Someday. Beyond that, there's a new document on security hardening from Kees, the movement of some sample code over to samples/, a number of improvements to the serial docs from Geert, and the usual collection of corrections, typo fixes, etc" * tag 'docs-for-linus' of git://git.lwn.net/linux: (55 commits) doc: self-protection: provide initial details serial: doc: Use port->state instead of info serial: doc: Always refer to tty_port->mutex Documentation: vm: Spelling s/paltform/platform/g Documentation/memcg: update kmem limit doc as codes behavior docproc: print a comment about autogeneration for rst output docproc: add support for reStructuredText format via --rst option docproc: abstract terminating lines at first space docproc: abstract docproc directive detection docproc: reduce unnecessary indentation docproc: add variables for subcommand and filename kernel-doc: use rst C domain directives and references for types kernel-doc: produce RestructuredText output kernel-doc: rewrite usage description, remove duplicated comments Doc: correct the location of sysrq.c Documentation: fix common spelling mistakes samples: v4l: from Documentation to samples directory samples: connector: from Documentation to samples directory Documentation: xillybus: fix spelling mistake Documentation: x86: fix spelling mistakes ...
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/ABI/obsolete/sysfs-driver-hid-roccat-savu11
-rw-r--r--Documentation/ABI/testing/sysfs-bus-event_source-devices-hv_24x72
-rw-r--r--Documentation/ABI/testing/sysfs-driver-hid-picolcd2
-rw-r--r--Documentation/ABI/testing/sysfs-firmware-acpi2
-rw-r--r--Documentation/DocBook/media/v4l/controls.xml2
-rw-r--r--Documentation/DocBook/media/v4l/dev-raw-vbi.xml2
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-g-selection.xml2
-rw-r--r--Documentation/IRQ-domain.txt12
-rw-r--r--Documentation/Makefile2
-rw-r--r--Documentation/RCU/RTFP.txt6
-rw-r--r--Documentation/adding-syscalls.txt2
-rw-r--r--Documentation/arm/SA1100/Assabet2
-rw-r--r--Documentation/block/00-INDEX4
-rw-r--r--Documentation/cgroup-v1/memory.txt14
-rw-r--r--Documentation/connector/.gitignore1
-rw-r--r--Documentation/connector/Makefile16
-rw-r--r--Documentation/connector/cn_test.c201
-rw-r--r--Documentation/connector/connector.txt8
-rw-r--r--Documentation/connector/ucon.c250
-rw-r--r--Documentation/devicetree/bindings/mfd/arizona.txt2
-rw-r--r--Documentation/driver-model/devres.txt3
-rw-r--r--Documentation/filesystems/cifs/README2
-rw-r--r--Documentation/filesystems/pohmelfs/design_notes.txt2
-rw-r--r--Documentation/filesystems/qnx6.txt2
-rw-r--r--Documentation/firmware_class/README2
-rw-r--r--Documentation/hwmon/abituguru2
-rw-r--r--Documentation/infiniband/ipoib.txt2
-rw-r--r--Documentation/ja_JP/HOWTO6
-rw-r--r--Documentation/kernel-docs.txt29
-rw-r--r--Documentation/ko_KR/HOWTO8
-rw-r--r--Documentation/laptops/toshiba_haps.txt2
-rw-r--r--Documentation/lzo.txt4
-rw-r--r--Documentation/mmc/00-INDEX2
-rw-r--r--Documentation/mmc/mmc-tools.txt34
-rw-r--r--Documentation/networking/can.txt2
-rw-r--r--Documentation/networking/filter.txt2
-rw-r--r--Documentation/pps/pps.txt2
-rw-r--r--Documentation/robust-futexes.txt6
-rw-r--r--Documentation/scsi/ChangeLog.megaraid_sas48
-rw-r--r--Documentation/scsi/bfa.txt2
-rw-r--r--Documentation/security/self-protection.txt261
-rw-r--r--Documentation/serial/driver54
-rw-r--r--Documentation/sysrq.txt2
-rw-r--r--Documentation/timers/hrtimers.txt6
-rw-r--r--Documentation/video4linux/README.cx882
-rw-r--r--Documentation/video4linux/bttv/Sound-FAQ2
-rw-r--r--Documentation/vm/hugetlbpage.txt6
-rw-r--r--Documentation/vm/pagemap.txt2
-rw-r--r--Documentation/x86/intel_mpx.txt4
-rw-r--r--Documentation/xillybus.txt2
-rw-r--r--Documentation/zh_CN/HOWTO4
-rw-r--r--Documentation/zh_CN/arm64/booting.txt20
52 files changed, 469 insertions, 601 deletions
diff --git a/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-savu b/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-savu
index f1e02a98bd9d..99fda67fce18 100644
--- a/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-savu
+++ b/Documentation/ABI/obsolete/sysfs-driver-hid-roccat-savu
@@ -3,9 +3,10 @@ Date: Mai 2012
Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
Description: The mouse can store 5 profiles which can be switched by the
press of a button. A profile is split into general settings and
- button settings. buttons holds informations about button layout.
- When written, this file lets one write the respective profile
- buttons to the mouse. The data has to be 47 bytes long.
+ button settings. The buttons variable holds information about
+ button layout. When written, this file lets one write the
+ respective profile buttons to the mouse. The data has to be
+ 47 bytes long.
The mouse will reject invalid data.
Which profile to write is determined by the profile number
contained in the data.
@@ -26,8 +27,8 @@ Date: Mai 2012
Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
Description: The mouse can store 5 profiles which can be switched by the
press of a button. A profile is split into general settings and
- button settings. profile holds informations like resolution, sensitivity
- and light effects.
+ button settings. A profile holds information like resolution,
+ sensitivity and light effects.
When written, this file lets one write the respective profile
settings back to the mouse. The data has to be 43 bytes long.
The mouse will reject invalid data.
diff --git a/Documentation/ABI/testing/sysfs-bus-event_source-devices-hv_24x7 b/Documentation/ABI/testing/sysfs-bus-event_source-devices-hv_24x7
index f893337570c1..ec27c6c9e737 100644
--- a/Documentation/ABI/testing/sysfs-bus-event_source-devices-hv_24x7
+++ b/Documentation/ABI/testing/sysfs-bus-event_source-devices-hv_24x7
@@ -4,7 +4,7 @@ Contact: Linux on PowerPC Developer List <linuxppc-dev@lists.ozlabs.org>
Description:
Provides access to the binary "24x7 catalog" provided by the
hypervisor on POWER7 and 8 systems. This catalog lists events
- avaliable from the powerpc "hv_24x7" pmu. Its format is
+ available from the powerpc "hv_24x7" pmu. Its format is
documented here:
https://raw.githubusercontent.com/jmesmon/catalog-24x7/master/hv-24x7-catalog.h
diff --git a/Documentation/ABI/testing/sysfs-driver-hid-picolcd b/Documentation/ABI/testing/sysfs-driver-hid-picolcd
index 08579e7e1e89..98fd81ad76a1 100644
--- a/Documentation/ABI/testing/sysfs-driver-hid-picolcd
+++ b/Documentation/ABI/testing/sysfs-driver-hid-picolcd
@@ -39,5 +39,5 @@ Description: Make it possible to adjust defio refresh rate.
Note: As device can barely do 2 complete refreshes a second
it only makes sense to adjust this value if only one or two
tiles get changed and it's not appropriate to expect the application
- to flush it's tiny changes explicitely at higher than default rate.
+ to flush its tiny changes explicitly at higher than default rate.
diff --git a/Documentation/ABI/testing/sysfs-firmware-acpi b/Documentation/ABI/testing/sysfs-firmware-acpi
index b4436cca97a8..c7fc72d4495c 100644
--- a/Documentation/ABI/testing/sysfs-firmware-acpi
+++ b/Documentation/ABI/testing/sysfs-firmware-acpi
@@ -169,7 +169,7 @@ Description:
to enable/disable/clear ACPI interrupts in user space, which can be
used to debug some ACPI interrupt storm issues.
- Note that only writting to VALID GPE/Fixed Event is allowed,
+ Note that only writing to VALID GPE/Fixed Event is allowed,
i.e. user can only change the status of runtime GPE and
Fixed Event with event handler installed.
diff --git a/Documentation/DocBook/media/v4l/controls.xml b/Documentation/DocBook/media/v4l/controls.xml
index 81efa883f67d..e2e5484d2d9b 100644
--- a/Documentation/DocBook/media/v4l/controls.xml
+++ b/Documentation/DocBook/media/v4l/controls.xml
@@ -2841,7 +2841,7 @@ for a GOP and keep it below or equal the set bitrate target. Otherwise the rate
overall average bitrate for the stream and keeps it below or equal to the set bitrate. In the first case
the average bitrate for the whole stream will be smaller then the set bitrate. This is caused because the
average is calculated for smaller number of frames, on the other hand enabling this setting will ensure that
-the stream will meet tight bandwidth contraints. Applicable to encoders.
+the stream will meet tight bandwidth constraints. Applicable to encoders.
</entry>
</row>
<row><entry></entry></row>
diff --git a/Documentation/DocBook/media/v4l/dev-raw-vbi.xml b/Documentation/DocBook/media/v4l/dev-raw-vbi.xml
index f4b61b6ce3c2..78599bbd58f7 100644
--- a/Documentation/DocBook/media/v4l/dev-raw-vbi.xml
+++ b/Documentation/DocBook/media/v4l/dev-raw-vbi.xml
@@ -85,7 +85,7 @@ initialize all fields of the &v4l2-vbi-format;
results of <constant>VIDIOC_G_FMT</constant>, and call the
&VIDIOC-S-FMT; ioctl with a pointer to this structure. Drivers return
an &EINVAL; only when the given parameters are ambiguous, otherwise
-they modify the parameters according to the hardware capabilites and
+they modify the parameters according to the hardware capabilities and
return the actual parameters. When the driver allocates resources at
this point, it may return an &EBUSY; to indicate the returned
parameters are valid but the required resources are currently not
diff --git a/Documentation/DocBook/media/v4l/vidioc-g-selection.xml b/Documentation/DocBook/media/v4l/vidioc-g-selection.xml
index 9523bc5650f9..997f4e96f297 100644
--- a/Documentation/DocBook/media/v4l/vidioc-g-selection.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-g-selection.xml
@@ -216,7 +216,7 @@ or the <structfield>flags</structfield> argument is not valid.</para>
<term><errorcode>ERANGE</errorcode></term>
<listitem>
<para>It is not possible to adjust &v4l2-rect; <structfield>
-r</structfield> rectangle to satisfy all contraints given in the
+r</structfield> rectangle to satisfy all constraints given in the
<structfield>flags</structfield> argument.</para>
</listitem>
</varlistentry>
diff --git a/Documentation/IRQ-domain.txt b/Documentation/IRQ-domain.txt
index 8d990bde8693..82001a25a14b 100644
--- a/Documentation/IRQ-domain.txt
+++ b/Documentation/IRQ-domain.txt
@@ -70,6 +70,7 @@ of the reverse map types are described below:
==== Linear ====
irq_domain_add_linear()
+irq_domain_create_linear()
The linear reverse map maintains a fixed size table indexed by the
hwirq number. When a hwirq is mapped, an irq_desc is allocated for
@@ -81,10 +82,16 @@ map are fixed time lookup for IRQ numbers, and irq_descs are only
allocated for in-use IRQs. The disadvantage is that the table must be
as large as the largest possible hwirq number.
+irq_domain_add_linear() and irq_domain_create_linear() are functionally
+equivalent, except for the first argument is different - the former
+accepts an Open Firmware specific 'struct device_node', while the latter
+accepts a more general abstraction 'struct fwnode_handle'.
+
The majority of drivers should use the linear map.
==== Tree ====
irq_domain_add_tree()
+irq_domain_create_tree()
The irq_domain maintains a radix tree map from hwirq numbers to Linux
IRQs. When an hwirq is mapped, an irq_desc is allocated and the
@@ -95,6 +102,11 @@ since it doesn't need to allocate a table as large as the largest
hwirq number. The disadvantage is that hwirq to IRQ number lookup is
dependent on how many entries are in the table.
+irq_domain_add_tree() and irq_domain_create_tree() are functionally
+equivalent, except for the first argument is different - the former
+accepts an Open Firmware specific 'struct device_node', while the latter
+accepts a more general abstraction 'struct fwnode_handle'.
+
Very few drivers should need this mapping.
==== No Map ===-
diff --git a/Documentation/Makefile b/Documentation/Makefile
index f3b04d22957c..de955e151af8 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -1,3 +1,3 @@
-subdir-y := accounting auxdisplay blackfin connector \
+subdir-y := accounting auxdisplay blackfin \
filesystems filesystems ia64 laptops mic misc-devices \
networking pcmcia prctl ptp timers vDSO watchdog
diff --git a/Documentation/RCU/RTFP.txt b/Documentation/RCU/RTFP.txt
index 370ca006db7a..9bccf16736f7 100644
--- a/Documentation/RCU/RTFP.txt
+++ b/Documentation/RCU/RTFP.txt
@@ -176,13 +176,13 @@ a history of how Linux changed RCU more than RCU changed Linux
which Mathieu Desnoyers is now maintaining [MathieuDesnoyers2009URCU]
[MathieuDesnoyersPhD]. TINY_RCU [PaulEMcKenney2009BloatWatchRCU] made
its appearance, as did expedited RCU [PaulEMcKenney2009expeditedRCU].
-The problem of resizeable RCU-protected hash tables may now be on a path
+The problem of resizable RCU-protected hash tables may now be on a path
to a solution [JoshTriplett2009RPHash]. A few academic researchers are now
using RCU to solve their parallel problems [HariKannan2009DynamicAnalysisRCU].
2010 produced a simpler preemptible-RCU implementation
based on TREE_RCU [PaulEMcKenney2010SimpleOptRCU], lockdep-RCU
-[PaulEMcKenney2010LockdepRCU], another resizeable RCU-protected hash
+[PaulEMcKenney2010LockdepRCU], another resizable RCU-protected hash
table [HerbertXu2010RCUResizeHash] (this one consuming more memory,
but allowing arbitrary changes in hash function, as required for DoS
avoidance in the networking code), realization of the 2009 RCU-protected
@@ -193,7 +193,7 @@ the RCU API [PaulEMcKenney2010RCUAPI].
[LinusTorvalds2011Linux2:6:38:rc1:NPigginVFS], an RCU-protected red-black
tree using software transactional memory to protect concurrent updates
(strange, but true!) [PhilHoward2011RCUTMRBTree], yet another variant of
-RCU-protected resizeable hash tables [Triplett:2011:RPHash], the 3.0 RCU
+RCU-protected resizable hash tables [Triplett:2011:RPHash], the 3.0 RCU
trainwreck [PaulEMcKenney2011RCU3.0trainwreck], and Neil Brown's "Meet the
Lockers" LWN article [NeilBrown2011MeetTheLockers]. Some academic
work looked at debugging uses of RCU [Seyster:2011:RFA:2075416.2075425].
diff --git a/Documentation/adding-syscalls.txt b/Documentation/adding-syscalls.txt
index cc2d4ac4f404..bbb31e091b28 100644
--- a/Documentation/adding-syscalls.txt
+++ b/Documentation/adding-syscalls.txt
@@ -136,7 +136,7 @@ an fxyzzy(3) operation for free:
- xyzzyat(fd, "", ..., AT_EMPTY_PATH) is equivalent to fxyzzy(fd, ...)
(For more details on the rationale of the *at() calls, see the openat(2) man
-page; for an example of AT_EMPTY_PATH, see the statat(2) man page.)
+page; for an example of AT_EMPTY_PATH, see the fstatat(2) man page.)
If your new xyzzy(2) system call involves a parameter describing an offset
within a file, make its type loff_t so that 64-bit offsets can be supported
diff --git a/Documentation/arm/SA1100/Assabet b/Documentation/arm/SA1100/Assabet
index 08b885d35674..e08a6739e72c 100644
--- a/Documentation/arm/SA1100/Assabet
+++ b/Documentation/arm/SA1100/Assabet
@@ -214,7 +214,7 @@ RedBoot scripting
-----------------
All the commands above aren't so useful if they have to be typed in every
-time the Assabet is rebooted. Therefore it's possible to automatize the boot
+time the Assabet is rebooted. Therefore it's possible to automate the boot
process using RedBoot's scripting capability.
For example, I use this to boot Linux with both the kernel and the ramdisk
diff --git a/Documentation/block/00-INDEX b/Documentation/block/00-INDEX
index e840b47613f7..e55103ace382 100644
--- a/Documentation/block/00-INDEX
+++ b/Documentation/block/00-INDEX
@@ -2,6 +2,8 @@
- This file
biodoc.txt
- Notes on the Generic Block Layer Rewrite in Linux 2.5
+biovecs.txt
+ - Immutable biovecs and biovec iterators
capability.txt
- Generic Block Device Capability (/sys/block/<device>/capability)
cfq-iosched.txt
@@ -14,6 +16,8 @@ deadline-iosched.txt
- Deadline IO scheduler tunables
ioprio.txt
- Block io priorities (in CFQ scheduler)
+pr.txt
+ - Block layer support for Persistent Reservations
null_blk.txt
- Null block for block-layer benchmarking.
queue-sysfs.txt
diff --git a/Documentation/cgroup-v1/memory.txt b/Documentation/cgroup-v1/memory.txt
index ff71e16cc752..b14abf217239 100644
--- a/Documentation/cgroup-v1/memory.txt
+++ b/Documentation/cgroup-v1/memory.txt
@@ -280,17 +280,9 @@ the amount of kernel memory used by the system. Kernel memory is fundamentally
different than user memory, since it can't be swapped out, which makes it
possible to DoS the system by consuming too much of this precious resource.
-Kernel memory won't be accounted at all until limit on a group is set. This
-allows for existing setups to continue working without disruption. The limit
-cannot be set if the cgroup have children, or if there are already tasks in the
-cgroup. Attempting to set the limit under those conditions will return -EBUSY.
-When use_hierarchy == 1 and a group is accounted, its children will
-automatically be accounted regardless of their limit value.
-
-After a group is first limited, it will be kept being accounted until it
-is removed. The memory limitation itself, can of course be removed by writing
--1 to memory.kmem.limit_in_bytes. In this case, kmem will be accounted, but not
-limited.
+Kernel memory accounting is enabled for all memory cgroups by default. But
+it can be disabled system-wide by passing cgroup.memory=nokmem to the kernel
+at boot time. In this case, kernel memory will not be accounted at all.
Kernel memory limits are not imposed for the root cgroup. Usage for the root
cgroup may or may not be accounted. The memory used is accumulated into
diff --git a/Documentation/connector/.gitignore b/Documentation/connector/.gitignore
deleted file mode 100644
index d2b9c32accd4..000000000000
--- a/Documentation/connector/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-ucon
diff --git a/Documentation/connector/Makefile b/Documentation/connector/Makefile
deleted file mode 100644
index d98e4df98e24..000000000000
--- a/Documentation/connector/Makefile
+++ /dev/null
@@ -1,16 +0,0 @@
-ifneq ($(CONFIG_CONNECTOR),)
-obj-m += cn_test.o
-endif
-
-# List of programs to build
-hostprogs-y := ucon
-
-# Tell kbuild to always build the programs
-always := $(hostprogs-y)
-
-HOSTCFLAGS_ucon.o += -I$(objtree)/usr/include
-
-all: modules
-
-modules clean:
- $(MAKE) -C ../.. SUBDIRS=$(PWD) $@
diff --git a/Documentation/connector/cn_test.c b/Documentation/connector/cn_test.c
deleted file mode 100644
index d12cc944b696..000000000000
--- a/Documentation/connector/cn_test.c
+++ /dev/null
@@ -1,201 +0,0 @@
-/*
- * cn_test.c
- *
- * 2004+ Copyright (c) Evgeniy Polyakov <zbr@ioremap.net>
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#define pr_fmt(fmt) "cn_test: " fmt
-
-#include <linux/kernel.h>
-#include <linux/module.h>
-#include <linux/moduleparam.h>
-#include <linux/skbuff.h>
-#include <linux/slab.h>
-#include <linux/timer.h>
-
-#include <linux/connector.h>
-
-static struct cb_id cn_test_id = { CN_NETLINK_USERS + 3, 0x456 };
-static char cn_test_name[] = "cn_test";
-static struct sock *nls;
-static struct timer_list cn_test_timer;
-
-static void cn_test_callback(struct cn_msg *msg, struct netlink_skb_parms *nsp)
-{
- pr_info("%s: %lu: idx=%x, val=%x, seq=%u, ack=%u, len=%d: %s.\n",
- __func__, jiffies, msg->id.idx, msg->id.val,
- msg->seq, msg->ack, msg->len,
- msg->len ? (char *)msg->data : "");
-}
-
-/*
- * Do not remove this function even if no one is using it as
- * this is an example of how to get notifications about new
- * connector user registration
- */
-#if 0
-static int cn_test_want_notify(void)
-{
- struct cn_ctl_msg *ctl;
- struct cn_notify_req *req;
- struct cn_msg *msg = NULL;
- int size, size0;
- struct sk_buff *skb;
- struct nlmsghdr *nlh;
- u32 group = 1;
-
- size0 = sizeof(*msg) + sizeof(*ctl) + 3 * sizeof(*req);
-
- size = NLMSG_SPACE(size0);
-
- skb = alloc_skb(size, GFP_ATOMIC);
- if (!skb) {
- pr_err("failed to allocate new skb with size=%u\n", size);
- return -ENOMEM;
- }
-
- nlh = nlmsg_put(skb, 0, 0x123, NLMSG_DONE, size - sizeof(*nlh), 0);
- if (!nlh) {
- kfree_skb(skb);
- return -EMSGSIZE;
- }
-
- msg = nlmsg_data(nlh);
-
- memset(msg, 0, size0);
-
- msg->id.idx = -1;
- msg->id.val = -1;
- msg->seq = 0x123;
- msg->ack = 0x345;
- msg->len = size0 - sizeof(*msg);
-
- ctl = (struct cn_ctl_msg *)(msg + 1);
-
- ctl->idx_notify_num = 1;
- ctl->val_notify_num = 2;
- ctl->group = group;
- ctl->len = msg->len - sizeof(*ctl);
-
- req = (struct cn_notify_req *)(ctl + 1);
-
- /*
- * Idx.
- */
- req->first = cn_test_id.idx;
- req->range = 10;
-
- /*
- * Val 0.
- */
- req++;
- req->first = cn_test_id.val;
- req->range = 10;
-
- /*
- * Val 1.
- */
- req++;
- req->first = cn_test_id.val + 20;
- req->range = 10;
-
- NETLINK_CB(skb).dst_group = ctl->group;
- //netlink_broadcast(nls, skb, 0, ctl->group, GFP_ATOMIC);
- netlink_unicast(nls, skb, 0, 0);
-
- pr_info("request was sent: group=0x%x\n", ctl->group);
-
- return 0;
-}
-#endif
-
-static u32 cn_test_timer_counter;
-static void cn_test_timer_func(unsigned long __data)
-{
- struct cn_msg *m;
- char data[32];
-
- pr_debug("%s: timer fired with data %lu\n", __func__, __data);
-
- m = kzalloc(sizeof(*m) + sizeof(data), GFP_ATOMIC);
- if (m) {
-
- memcpy(&m->id, &cn_test_id, sizeof(m->id));
- m->seq = cn_test_timer_counter;
- m->len = sizeof(data);
-
- m->len =
- scnprintf(data, sizeof(data), "counter = %u",
- cn_test_timer_counter) + 1;
-
- memcpy(m + 1, data, m->len);
-
- cn_netlink_send(m, 0, 0, GFP_ATOMIC);
- kfree(m);
- }
-
- cn_test_timer_counter++;
-
- mod_timer(&cn_test_timer, jiffies + msecs_to_jiffies(1000));
-}
-
-static int cn_test_init(void)
-{
- int err;
-
- err = cn_add_callback(&cn_test_id, cn_test_name, cn_test_callback);
- if (err)
- goto err_out;
- cn_test_id.val++;
- err = cn_add_callback(&cn_test_id, cn_test_name, cn_test_callback);
- if (err) {
- cn_del_callback(&cn_test_id);
- goto err_out;
- }
-
- setup_timer(&cn_test_timer, cn_test_timer_func, 0);
- mod_timer(&cn_test_timer, jiffies + msecs_to_jiffies(1000));
-
- pr_info("initialized with id={%u.%u}\n",
- cn_test_id.idx, cn_test_id.val);
-
- return 0;
-
- err_out:
- if (nls && nls->sk_socket)
- sock_release(nls->sk_socket);
-
- return err;
-}
-
-static void cn_test_fini(void)
-{
- del_timer_sync(&cn_test_timer);
- cn_del_callback(&cn_test_id);
- cn_test_id.val--;
- cn_del_callback(&cn_test_id);
- if (nls && nls->sk_socket)
- sock_release(nls->sk_socket);
-}
-
-module_init(cn_test_init);
-module_exit(cn_test_fini);
-
-MODULE_LICENSE("GPL");
-MODULE_AUTHOR("Evgeniy Polyakov <zbr@ioremap.net>");
-MODULE_DESCRIPTION("Connector's test module");
diff --git a/Documentation/connector/connector.txt b/Documentation/connector/connector.txt
index f6215f95149b..ab7ca897fab7 100644
--- a/Documentation/connector/connector.txt
+++ b/Documentation/connector/connector.txt
@@ -186,3 +186,11 @@ only cn_test.c test module used it.
Some work in netlink area is still being done, so things can be changed in
2.6.15 timeframe, if it will happen, documentation will be updated for that
kernel.
+
+/*****************************************/
+Code samples
+/*****************************************/
+
+Sample code for a connector test module and user space can be found
+in samples/connector/. To build this code, enable CONFIG_CONNECTOR
+and CONFIG_SAMPLES.
diff --git a/Documentation/connector/ucon.c b/Documentation/connector/ucon.c
deleted file mode 100644
index 8a4da64e02a8..000000000000
--- a/Documentation/connector/ucon.c
+++ /dev/null
@@ -1,250 +0,0 @@
-/*
- * ucon.c
- *
- * Copyright (c) 2004+ Evgeniy Polyakov <zbr@ioremap.net>
- *
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by