History log of /linux-master/drivers/w1/w1.c
Revision Date Author Comments
# a5251cd9 04-Feb-2024 Ricardo B. Marliere <ricardo@marliere.net>

w1: make w1_bus_type const

Now that the driver core can properly handle constant struct bus_type,
move the w1_bus_type variable to be a constant structure as well,
placing it into read-only memory which can not be modified at runtime.

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net>
Link: https://lore.kernel.org/r/20240204-bus_cleanup-w1-v1-1-a0f4c84d7db3@marliere.net
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>


# b332af53 12-May-2023 Jakob Koschel <jkl820.git@gmail.com>

w1: Replace usage of found with dedicated list iterator variable

To move the list iterator variable into the list_for_each_entry_*()
macro in the future it should be avoided to use the list iterator
variable after the loop body.

To *never* use the list iterator variable after the loop it was
concluded to use a separate iterator variable instead of a
found boolean [1].

This removes the need to use a found variable and simply checking if
the variable was set, can determine if the break/goto was hit.

Link: https://lore.kernel.org/all/CAHk-=wgRr_D8CB-D9Kg-c=EHreAsk5SqXPwr9Y7k9sA6cWXJ6w@mail.gmail.com/ [1]
Signed-off-by: Jakob Koschel <jkl820.git@gmail.com>
Link: https://lore.kernel.org/r/20230509-w1-replace-usage-of-found-with-tmp-list-iterator-variable-v3-1-e07c9603fd9d@gmail.com
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>


# 51cbbcd6 15-Jun-2022 Liang He <windhl@126.com>

w1: Add missing of_node_put() in w1.c

In __w1_attach_slave_device, we really need not to use of_node_put
in normal path as the reference is escaped by sl. However, we need
of_node_put in the fail path before put_device.

Signed-off-by: Liang He <windhl@126.com>
Link: https://lore.kernel.org/r/20220615125105.3966317-1-windhl@126.com
[krzysztof: fix whitespace / checkpatch]
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>


# ecaed1a2 07-May-2022 Jason Wang <wangborong@cdjrlc.com>

w1: no need to initialise statics to 0

Static variables do not need to be initialised to 0, because compiler
will initialise all uninitialised statics to 0. Thus, remove the
unneeded initializations.

Signed-off-by: Jason Wang <wangborong@cdjrlc.com>
Link: https://lore.kernel.org/r/20220508023400.102244-1-wangborong@cdjrlc.com
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>


# 83f3fcf9 19-May-2021 Dan Carpenter <error27@gmail.com>

w1: fix loop in w1_fini()

The __w1_remove_master_device() function calls:

list_del(&dev->w1_master_entry);

So presumably this can cause an endless loop.

Fixes: 7785925dd8e0 ("[PATCH] w1: cleanups.")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>


# 9033ff4c 21-Jul-2021 Colin Ian King <colin.i.king@gmail.com>

w1: remove redundant initialization to variable result

The variable result is being initialized with a value that is never
read, it is being updated later on. The assignment is redundant and
can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20210721103451.43026-1-colin.king@canonical.com
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>


# a8c4dda9 18-Jun-2021 zuoqilin <zuoqilin@yulong.com>

w1: Simplify the atribute show

There is no necessary to define variable assignment, return directly.

Signed-off-by: zuoqilin <zuoqilin@yulong.com>
Link: https://lore.kernel.org/r/20210618092418.1424-1-zuoqilin1@163.com
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>


# 388f22fe 18-Mar-2023 Lizhe <sensor1010@163.com>

w1: Remove driver match function

If there is no driver match function, the driver core assumes that each
candidate pair (driver, device) matches, see driver_match_device().

Drop the bus's match function that always returned 1 and so
implements the same behaviour as when there is no match function

Signed-off-by: Lizhe <sensor1010@163.com>
Link: https://lore.kernel.org/r/20230319044107.311555-1-sensor1010@163.com
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>


# 2a81ada3 10-Jan-2023 Greg Kroah-Hartman <gregkh@linuxfoundation.org>

driver core: make struct bus_type.uevent() take a const *

The uevent() callback in struct bus_type should not be modifying the
device that is passed into it, so mark it as a const * and propagate the
function signature changes out into all relevant subsystems that use
this callback.

Acked-by: Rafael J. Wysocki <rafael@kernel.org>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20230111113018.459199-16-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 36225a7c 05-Dec-2022 Yang Yingliang <yangyingliang@huawei.com>

w1: fix WARNING after calling w1_process()

I got the following WARNING message while removing driver(ds2482):

------------[ cut here ]------------
do not call blocking ops when !TASK_RUNNING; state=1 set at [<000000002d50bfb6>] w1_process+0x9e/0x1d0 [wire]
WARNING: CPU: 0 PID: 262 at kernel/sched/core.c:9817 __might_sleep+0x98/0xa0
CPU: 0 PID: 262 Comm: w1_bus_master1 Tainted: G N 6.1.0-rc3+ #307
RIP: 0010:__might_sleep+0x98/0xa0
Call Trace:
exit_signals+0x6c/0x550
do_exit+0x2b4/0x17e0
kthread_exit+0x52/0x60
kthread+0x16d/0x1e0
ret_from_fork+0x1f/0x30

The state of task is set to TASK_INTERRUPTIBLE in loop in w1_process(),
set it to TASK_RUNNING when it breaks out of the loop to avoid the
warning.

Fixes: 3c52e4e62789 ("W1: w1_process, block or sleep")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20221205101558.3599162-1-yangyingliang@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 25d56488 05-Dec-2022 Yang Yingliang <yangyingliang@huawei.com>

w1: fix deadloop in __w1_remove_master_device()

I got a deadloop report while doing device(ds2482) add/remove test:

[ 162.241881] w1_master_driver w1_bus_master1: Waiting for w1_bus_master1 to become free: refcnt=1.
[ 163.272251] w1_master_driver w1_bus_master1: Waiting for w1_bus_master1 to become free: refcnt=1.
[ 164.296157] w1_master_driver w1_bus_master1: Waiting for w1_bus_master1 to become free: refcnt=1.
...

__w1_remove_master_device() can't return, because the dev->refcnt is not zero.

w1_add_master_device() |
w1_alloc_dev() |
atomic_set(&dev->refcnt, 2) |
kthread_run() |
|__w1_remove_master_device()
| kthread_stop()
// KTHREAD_SHOULD_STOP is set, |
// threadfn(w1_process) won't be |
// called. |
kthread() |
| // refcnt will never be 0, it's deadloop.
| while (atomic_read(&dev->refcnt)) {...}

After calling w1_add_master_device(), w1_process() is not really
invoked, before w1_process() starting, if kthread_stop() is called
in __w1_remove_master_device(), w1_process() will never be called,
the refcnt can not be decreased, then it causes deadloop in remove
function because of non-zero refcnt.

We need to make sure w1_process() is really started, so move the
set refcnt into w1_process() to fix this problem.

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20221205080434.3149205-1-yangyingliang@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 48b7de66 13-Jan-2021 Christian Vogel <vogelchr@vogel.cx>

w1/w1.c: w1 address crc quick for DS28E04 eeproms

Onewire addresses are 64bit family(8bit), unique_id(48bit), crc(8bit)
(LSBt to MSB) and self-consistent: crc = crc8(family, unique).

DS28E04-100 4096-Bit Addressable 1-Wire EEPROM with PIO have strap pins
to set 7 LSB of the address, unfortunately without updating the crc
part of the address. It is only consistent if all strap pins float high.
[see datasheet 19-6134; Rev 12/11 page 6: 64-bit device id number]

We therefore introduce a special handling of family 0x1c (DS28E04) to
check address consistency with 7 LSBs of the unique_id set to 1.

Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Christian Vogel <vogelchr@vogel.cx>
Link: https://lore.kernel.org/r/20210113195018.7498-2-vogelchr@vogel.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 57de2dfc 04-Oct-2020 Rikard Falkeborn <rikard.falkeborn@gmail.com>

w1: Constify static w1_family_ops structs

The only usage of these structs is to assign their address to the fops
field in the w1_family struct, which is a const pointer. Make them const
to allow the compiler to put them in read-only memory.

This was done with the following Coccinelle semantic patch
(http://coccinelle.lip6.fr/):

// <smpl>
@r1 disable optional_qualifier @
identifier i;
position p;
@@
static struct w1_family_ops i@p = {...};

@ok1@
identifier r1.i;
position p;
identifier s;
@@
static struct w1_family s = {
.fops=&i@p,
};

@bad1@
position p!={r1.p,ok1.p};
identifier r1.i;
@@
i@p

@depends on !bad1 disable optional_qualifier@
identifier r1.i;
@@
static
+const
struct w1_family_ops i={};
// </smpl>

Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Link: https://lore.kernel.org/r/20201004193202.4044-3-rikard.falkeborn@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 07f8569f 04-Oct-2020 Rikard Falkeborn <rikard.falkeborn@gmail.com>

w1: Constify struct w1_family_ops

The fops field in the w1_family struct is never modified. Make it const
to indicate that. Constifying the pointer makes it possible for drivers
to declare static w1_family_ops structs const, which in turn will allow
the compiler to put it in read-only memory.

Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Link: https://lore.kernel.org/r/20201004193202.4044-2-rikard.falkeborn@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# c942fddf 27-May-2019 Thomas Gleixner <tglx@linutronix.de>

treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157

Based on 3 normalized pattern(s):

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

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 [author] [kishon] [vijay] [abraham]
[i] [kishon]@[ti] [com] 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

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 [author] [graeme] [gregory]
[gg]@[slimlogic] [co] [uk] [author] [kishon] [vijay] [abraham] [i]
[kishon]@[ti] [com] [based] [on] [twl6030]_[usb] [c] [author] [hema]
[hk] [hemahk]@[ti] [com] 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

extracted by the scancode license scanner the SPDX license identifier

GPL-2.0-or-later

has been chosen to replace the boilerplate/reference in 1105 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Allison Randal <allison@lohutok.net>
Reviewed-by: Richard Fontana <rfontana@redhat.com>
Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190527070033.202006027@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# fae68031 05-Jul-2018 Daniel Mack <daniel@zonque.org>

w1: core: match sub-nodes of bus masters in devicetree

Once a new slave device is detected, match it against all sub-nodes of the
master bus controller. If a match is found, set the slave device's of_node
pointer.

Signed-off-by: Daniel Mack <daniel@zonque.org>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>


# 065c0956 01-May-2018 Ingo Flaschberger <ingo.flaschberger@gmail.com>

1wire: family module autoload fails because of upper/lower case mismatch.

1wire family module autoload fails because of upper/lower
 case mismatch.

Signed-off-by: Ingo Flaschberger <ingo.flaschberger@gmail.com>
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 0ec4eb71 06-Mar-2018 Arvind Yadav <arvind.yadav.cs@gmail.com>

w1: use put_device() if device_register() fail

If device_register() returned an error! Always use put_device()
to give up the reference initialized in device_register().

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 2eb79548 30-Aug-2017 Jaghathiswari Rankappagounder Natarajan <jaghu@google.com>

drivers: w1: add hwmon support structures

This patch has changes to w1.h/w1.c generic files to add (optional) hwmon
support structures.

Signed-off-by: Jaghathiswari Rankappagounder Natarajan <jaghu@google.com>
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# f6887531 27-Aug-2017 Andrew Worsley <amworsley@gmail.com>

drivers: w1: Add 1w slave driver for DS28E05 EEPROM

Add a one wire driver for the DS28E05 one wire slave chip. This chip
requires OverDrive support to talk to it.

Signed-off-by: Andrew Worsley <amworsley@gmail.com>
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# a890d56a 28-Jul-2017 Arvind Yadav <arvind.yadav.cs@gmail.com>

w1: constify attribute_group structures.

attribute_group are not supposed to change at runtime. All functions
working with attribute_group provided by <linux/sysfs.h> work with
const attribute_group. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 2c927c0c 13-Jun-2017 Alex A. Mihaylov <minimumlaw@rambler.ru>

w1: Fix slave count on 1-Wire bus (resend)

1-Wire bus have very fast algorith for exchange with single slave
device. Fix incorrect count of slave devices on connect second slave
device. This case on slave device probe() step we need use generic
(multislave) functions for read/write device.

Signed-off-by: Alex A. Mihaylov <minimumlaw@rambler.ru>
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# de0d6dbd 05-Jun-2017 Andrew F. Davis <afd@ti.com>

w1: Add subsystem kernel public interface

Like other subsystems we should be able to define slave devices outside
of the w1 directory. To do this we move public facing interface
definitions to include/linux/w1.h and rename the internal definition
file to w1_internal.h.

As w1_family.h and w1_int.h contained almost entirely public
driver interface definitions we simply removed these files and
moved the remaining definitions into w1_internal.h.

With this we can now start to move slave devices out of w1/slaves and
into the subsystem based on the function they implement, again like
other drivers.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Sebastian Reichel <sre@kernel.org>
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 50fa2951 16-May-2017 Andrew F. Davis <afd@ti.com>

w1: Organize driver source to natural/common order

Structures and functions should be ordered such that forward declaration
use is minimized.

MODULE_* macros should immediately follow the structures and functions
upon which they act.

Remaining MODULE_* macros should be at the end of the file in
alphabetical order.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 91bd2855 16-Mar-2017 Andrew F. Davis <afd@ti.com>

w1: Remove unneeded use of assert() and remove w1_log.h

The only use of assert() is in matrox_w1.c and is used to check the input
to probe() from the PCI subsystem for NULL values, these are guaranteed
to be populated and no other PCI driver makes this check, remove this.

As this was the only definition in w1_log.h, remove this also.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 8a0934bf 05-Jan-2017 Andrew F. Davis <afd@ti.com>

w1: Fixup source file headers

Remove filename from file, this is not done anymore as it doesn't
add anything and usually is incorrect as filename change often.

Also shorten the GPL to the more common address-less version and
remove excess white-space.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# d2ce4ea1 21-Jan-2017 Maciej S. Szmigiero <mail@maciej.szmigiero.name>

w1: don't leak refcount on slave attach failure in w1_attach_slave_device()

Near the beginning of w1_attach_slave_device() we increment a w1 master
reference count.
Later, when we are going to exit this function without actually attaching
a slave device (due to failure of __w1_attach_slave_device()) we need to
decrement this reference count back.

Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name>
Cc: stable@vger.kernel.org
Fixes: 9fcbbac5ded489 ("w1: process w1 netlink commands in w1_process thread")
Cc: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# a46b195c 08-Aug-2016 Wei Yongjun <weiyj.lk@gmail.com>

w1: fix timeout_us parameter description

Fix 'timeout_us' parameter description.

Signed-off-by: Wei Yongjun <weiyj.lk@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# b9c11a23 13-Apr-2016 Dan Carpenter <dan.carpenter@oracle.com>

w1: silence an uninitialized variable warning

If kstrtoint() returns -ERANGE then "tmp" is uninitialized.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Evgeniy Polaykov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# cf09d642 10-Feb-2016 Jiri Kosina <jkosina@suse.cz>

w1: w1_process() is not freezable kthread

w1_process() calls try_to_freeze(), but the thread doesn't mark itself
freezable through set_freezable(), so the try_to_freeze() call is useless.

Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# c3098356 12-May-2015 Dmitry Khromov <dk@icelogic.net>

w1: introduce an ability to specify microseconds bus scanning intervals

Some of 1-Wire devices commonly associated with physical access control
systems are attached/generate presence for as short as 100 ms - hence
the tens-to-hundreds milliseconds scan intervals are required.

Signed-off-by: Dmitry Khromov <dk@icelogic.net>
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 4b7e4f82 18-Nov-2014 NeilBrown <neilb@suse.de>

w1: support auto-load of w1_bq27000 module.

1/ change request_module call to zero-pad single digit
family numbers. This appears to be the intention of
the code, but not what it actually does.

This means that the alias created for W1_FAMILY_SMEM_01
might actually be useful.

2/ Define a family name for the BQ27000 battery charge monitor.
Unfortunately this is the same number as W1_FAMILY_SMEM_01
so if both a compiled on a system, one module might need to
be blacklisted.

3/ Add a MODULE_ALIAS for the bq27000.

Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# fdc9167a 18-Jun-2014 Fjodor Schelichow <fjodor.schelichow@hotmail.com>

w1: use pr_* instead of printk

This patch replaces all calls to the "printk" function within the main "w1"
directory by calls to the appropriate "pr_*" function thus addressing
the following warning generated by the checkpatch script:

WARNING: Prefer [subsystem eg: netdev]_err([subsystem]dev, ...
then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ...

Signed-off-by: Fjodor Schelichow <fjodor.schelichow@hotmail.com>
Signed-off-by: Roman Sommer <romsom2@yahoo.de>
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# a0f10464 06-May-2014 Alexey Khoroshilov <khoroshilov@ispras.ru>

w1: do not unlock unheld list_mutex in __w1_remove_master_device()

w1_process_callbacks() expects to be called with dev->list_mutex held,
but it is the fact only in w1_process(). __w1_remove_master_device()
calls w1_process_callbacks() after it releases list_mutex.

The patch fixes __w1_remove_master_device() to acquire list_mutex
for w1_process_callbacks().

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Acked-by: David Fries <david@fries.net>
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Cc: stable <stable@vger.kernel.org> # 3.15
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 18d7f891 16-Apr-2014 David Fries <david@fries.net>

w1: avoid recursive device_add

__w1_attach_slave_device calls device_add which calls w1_bus_notify
which calls the w1_bq27000 slave driver, which calls
platform_device_add and device_add and deadlocks on getting
&(&priv->bus_notifier)->rwsem as it is still held in the previous
device_add. This avoids the problem by processing the family
add/remove outside of the slave device_add call.

Commit 47eba33a0997fc7362a introduced this deadlock and added
a KOBJ_ADD, as the add was already reported in device_register two add
events were being sent. This change suppresses the device_register
add so that any slave device sysfs entries are setup before the add
goes out.

Belisko Marek reported this change fixed the deadlock he was seeing on
ARM device tree, while testing on my x86-64 system never saw the
deadlock.

Reported-by: Belisko Marek <marek.belisko@gmail.com>
Signed-off-by: David Fries <David@Fries.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# a7155f4e 11-Feb-2014 Dan Carpenter <dan.carpenter@oracle.com>

w1: small type cleanup in sysfs

On 64 bit systems, a large value for "long tmp" is truncated when
assigning to "int md->max_slave_count" so we still end up with a value
less than one despite the "tmp < 1" check.

This is more of a problem for static checkers than a real life issue,
but it's simple enough to fix.

Acked-by: David Fries <david@fries.net>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# b3be177a 15-Jan-2014 David Fries <David@Fries.net>

w1: format for DocBook and fixes

Switch the code documentation format style to DocBook format, enable
DocBook documentation generation, and fix some comments.

Signed-off-by: David Fries <David@Fries.net>
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 9fcbbac5 15-Jan-2014 David Fries <David@Fries.net>

w1: process w1 netlink commands in w1_process thread

Netlink is a socket interface and is expected to be asynchronous.
Clients can now make w1 requests without blocking by making use of the
w1_master thread to process netlink commands which was previously only
used for doing an automatic bus search.

Signed-off-by: David Fries <David@Fries.net>
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 70b34d2e 15-Jan-2014 David Fries <David@Fries.net>

w1: new netlink commands, add/remove/list slaves

Introduce new commands to add, remove, and list slave devices through
the netlink interface. This can be useful to skip the search on a
static network. They could previously only be added or removed
through automatic search or sysfs, and this allows a program to only
use netlink.

Only allocate memory when needed, so move kzalloc into w1_get_slaves
where it was used.

Signed-off-by: David Fries <David@Fries.net>
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 3c6955e5 15-Jan-2014 David Fries <David@Fries.net>

w1: continue slave search where previous left off

Search will detect at most max_slave_count devices per run, if there
are more pick up the next search where the previous left off.

Signed-off-by: David Fries <David@Fries.net>
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# a1613056 15-Jan-2014 David Fries <David@Fries.net>

w1: increase w1_max_slave_count, allow write access

w1_max_slave_count is only used to abort the search early
or take a fast search (when 1), so there isn't any reason to not allow
it to be updated through sysfs. Memory is not allocated based on
the current value and 10 is a rather low base number, increasing to
64, and printing a message the first time the count is reached and
there were more devices to discover to let the user know why not
all the devices were found.

Signed-off-by: David Fries <David@Fries.net>
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# af8c7237 15-Jan-2014 David Fries <David@Fries.net>

w1: Only wake up the search process if it is going to be searching

It's valid to set the search count to 0 to stop searching, so don't
wake up the search thread to not search.

Signed-off-by: David Fries <David@Fries.net>
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 42105698 15-Jan-2014 David Fries <David@Fries.net>

w1: fixup search to support abort from netlink

Before 63706172f33 "rework kthread_stop()" kthread_should_stop()
always returned false when called from a non-kthread task, after it
would oops as a non-kthread didn't have that structure and netlink was
calling search from a thread which wasn't a kthread. 9d1817cab2f030
"w1: fix oops when w1_search is called from netlink connector",
modified the code to avoid calling kthread_stop from a netlink thread.

Introduce a w1_master flag and bit W1_ABORT_SEARCH to identify abort
to cleanly support both kthread and netlink search abort. A search
can take seconds to run, so it is important to abort early if the
hardware is removed in the middle of a search.

Signed-off-by: David Fries <David@Fries.net>
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Cc: Marcin Jurkowski <marcin1j@gmail.com>
Cc: Josh Boyer <jwboyer@gmail.com>
Cc: Sven Geggus <lists@fuchsschwanzdomain.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# bb670937 12-Nov-2013 Michal Nazarewicz <mina86@mina86.com>

drivers: w1: make w1_slave::flags long to avoid memory corruption

On architectures where long is more then 32 bits, modifying a 32-bit field
with set_bit (and other atomic bit operations) may cause bytes following
the field to by modified.

Because the endianness of the bits within a field is the native endianness
of the CPU[1], on big-endian machines, bit number zero is in the last byte
of the field.

Therefore, `set_bit(0, ptr)' on a 64-bit big-endian machine is roughly
equivalent to `((char *)ptr)[7] |= 1', and since w1 driver uses a 32-bit
field for holding the flags, this causes bytes beyond the field to be
modified.

[1] From Documentation/atomic_ops.txt:

Native atomic bit operations are defined to operate on objects
aligned to the size of an "unsigned long" C data type, and are
least of that size. The endianness of the bits within each
"unsigned long" are the native endianness of the cpu.

Signed-off-by: Michal Nazarewicz <mina86@mina86.com>
Cc: Evgeniy Polyakov <zbr@ioremap.net>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# bc04d76d 06-Oct-2013 Hans-Frieder Vogt <hfvogt@gmx.net>

w1 - call request_module with w1 master mutex unlocked

request_module for w1 slave modules needs to be called with the w1
master mutex unlocked. Because w1_attach_slave_device gets always(?)
called with mutex locked, we need to temporarily unlock the w1 master
mutex for the loading of the w1 slave module.

Signed-off by: Hans-Frieder Vogt <hfvogt@gmx.net>
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Cc: stable <stable@vger.kernel.org> # 3.11+

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 2962aece 06-Oct-2013 Hans-Frieder Vogt <hfvogt@gmx.net>

w1 - fix fops in w1_bus_notify

Introduce a check to make sure that fops are only called if they have
been defined by the slave module.

Without this check modules like w1_smem cause a NULL pointer dereference
bug.

Signed-off by: Hans-Frieder Vogt <hfvogt@gmx.net>
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Cc: stable <stable@vger.kernel.org> # 3.11+

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# bf4228f0 11-Sep-2013 Jingoo Han <jg1.han@samsung.com>

drivers/w1/w1.c: replace strict_strtol() with kstrtol()

The usage of strict_strtol() is not preferred, because strict_strtol() is
obsolete. Thus, kstrtol() should be used.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Cc: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# 36c27a65 21-Aug-2013 Greg Kroah-Hartman <gregkh@linuxfoundation.org>

w1: add attribute groups to struct w1_family_ops

This lets w1 slave drivers declare an attribute group, and not have to
create/destroy sysfs files directly. All w1 slave drivers will be fixed
to use this field up in follow-on patches to this one.

Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 5b187b3c 21-Aug-2013 Greg Kroah-Hartman <gregkh@linuxfoundation.org>

w1: use default attribute groups for w1 slave devices

As we have 2 sysfs files for the w1 slave devices, let the driver core
create / destroy them automatically by setting the default attribute
group for them, saving code and housekeeping logic.

Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 47eba33a 21-Aug-2013 Greg Kroah-Hartman <gregkh@linuxfoundation.org>

w1: remove race with sysfs file creation

W1 slave sysfs files are created _after_ userspace is notified that the
device has been added to the system. Fix that race by moving the
creation/remove of the files to the bus notifier that is there for doing
this type of thing.

Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 8d7bda51 26-May-2013 Alexander Stein <alexander.stein@informatik.tu-chemnitz.de>

w1: add family based automatic module loading

This patch allows the 1-wire bus to autoload the corresponding module
for each slave being attached.
This works similar to bluetooth protocols.

Signed-off-by: Alexander Stein <alexander.stein@informatik.tu-chemnitz.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 9d1817ca 02-Mar-2013 Marcin Jurkowski <marcin1j@gmail.com>

w1: fix oops when w1_search is called from netlink connector

On Sat, Mar 02, 2013 at 10:45:10AM +0100, Sven Geggus wrote:
> This is the bad commit I found doing git bisect:
> 04f482faf50535229a5a5c8d629cf963899f857c is the first bad commit
> commit 04f482faf50535229a5a5c8d629cf963899f857c
> Author: Patrick McHardy <kaber@trash.net>
> Date: Mon Mar 28 08:39:36 2011 +0000

Good job. I was too lazy to bisect for bad commit;)

Reading the code I found problematic kthread_should_stop call from netlink
connector which causes the oops. After applying a patch, I've been testing
owfs+w1 setup for nearly two days and it seems to work very reliable (no
hangs, no memleaks etc).
More detailed description and possible fix is given below:

Function w1_search can be called from either kthread or netlink callback.
While the former works fine, the latter causes oops due to kthread_should_stop
invocation.

This patch adds a check if w1_search is serving netlink command, skipping
kthread_should_stop invocation if so.

Signed-off-by: Marcin Jurkowski <marcin1j@gmail.com>
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Cc: Josh Boyer <jwboyer@gmail.com>
Tested-by: Sven Geggus <lists@fuchsschwanzdomain.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: stable <stable@vger.kernel.org> # 3.0+


# 2c9e9fdc 19-Nov-2012 Bill Pemberton <wfp5p@virginia.edu>

w1: remove CONFIG_HOTPLUG ifdefs

Remove conditional code based on CONFIG_HOTPLUG being false. It's
always on now in preparation of it going away as an option.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# b02f8bed 17-May-2012 NeilBrown <neilb@suse.de>

W1: split master mutex to avoid deadlocks.

The 'mutex' in struct w1_master is use for two very different
purposes.

Firstly it protects various data structures such as the list of all
slaves.

Secondly it protects the w1 buss against concurrent accesses.

This can lead to deadlocks when the ->probe code called while adding a
slave needs to talk on the bus, as is the case for power_supply
devices.
ds2780 and ds2781 drivers contain a work around to track which
process hold the lock simply to avoid this deadlock. bq27000 doesn't
have that work around and so deadlocks.

There are other possible deadlocks involving sysfs.
When removing a device the sysfs s_active lock is held, so the lock
that protects the slave list must take precedence over s_active.
However when access power_supply attributes via sysfs, the s_active
lock must take precedence over the lock that protects accesses to
the bus.

So to avoid deadlocks between w1 slaves and sysfs, these must be
two separate locks. Making them separate means that the work around
in ds2780 and ds2781 can be removed.

So this patch:
- adds a new mutex: "bus_mutex" which serialises access to the bus.
- takes in mutex in w1_search and ds1wm_search while they access
the bus for searching. The mutex is dropped before calling the
callback which adds the slave.
- changes all slaves to use bus_mutex instead of mutex to
protect access to the bus
- removes w1_ds2790_io_nolock and w1_ds2781_io_nolock, and the
related code from drivers/power/ds278[01]_battery.c which
calls them.

Signed-off-by: NeilBrown <neilb@suse.de>
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# dd0aa67c 13-Jun-2012 Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Revert "w1: introduce a slave mutex for serializing IO"

This reverts commit 59d4467be405316916a4087d5b02d99196eeef04.

Turns out it was the wrong version, will apply the correct version after
this.

Reported-by: NeilBrown <neilb@suse.de>
Cc: Evgeniy Polyakov <zbr@ioremap.net>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 526be416 18-May-2012 Devendra Naga <devendra.aaru@gmail.com>

w1: cleanup w1_uevent

There were some return statements around in the w1_uevent, used goto
to cleanup those return statements with the help of err variable,
and also removed a semi colon at the end of the w1_uevent's closing
brace.

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 59d4467b 01-May-2012 NeilBrown <neilb@suse.de>

w1: introduce a slave mutex for serializing IO

w1 devices need a mutex to serial IO. Most use master->mutex.
However that is used for other purposes and they can conflict.

In particular master->mutex is held while w1_attach_slave_device is
called.

For bq27000, this registers a 'powersupply' device which tries to read the
current status. The attempt to read will cause a deadlock on
master->mutex.

So create a new per-slave mutex and use that for serializing IO for
bq27000.

Signed-off-by: NeilBrown <neilb@suse.de>
Cc: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# ecf19489 01-Apr-2012 Dmitry Artamonow <mad_soft@inbox.ru>

w1: fix slave driver registration error message

W1 core prints "Failed to register master driver" if error happens
on registering SLAVE driver. Fix it.

Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# a03abdcb 01-Apr-2012 Dmitry Artamonow <mad_soft@inbox.ru>

w1: fix slave driver registration error message

W1 core prints "Failed to register master driver" if error happens
on registering SLAVE driver. Fix it.

Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>


# c9cbf558 09-Dec-2011 Evgeniy Polyakov <zbr@ioremap.net>

w1: add fast search for single slave bus

This enables a much more efficient way of device searching. It uses the
1-wire read-rom operation which allows the direct reading of the slave
address. BUT this works only with exactly one slave on the bus.

Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com>
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>

index c374978..9761950 100644
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# a8018766 25-Aug-2011 Evgeniy Polyakov <zbr@ioremap.net>

MAINTAINERS: Evgeniy has moved

Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# 60063497 26-Jul-2011 Arun Sharma <asharma@fb.com>

atomic: use <linux/atomic.h>

This allows us to move duplicated code in <asm/atomic.h>
(atomic_inc_not_zero() for now) to <linux/atomic.h>

Signed-off-by: Arun Sharma <asharma@fb.com>
Reviewed-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: David Miller <davem@davemloft.net>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# 963bb101 26-May-2011 David Fries <David@Fries.net>

w1: have netlink search update kernel list

Reorganize so the netlink connector one wire search command will update
the kernel list of detected slave devices. Otherwise, a newly detected
device is unusable because unless it's in the kernel list of known devices
any commands will result in ENODEV status.

Signed-off-by: David Fries <David@Fries.net>
Cc: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# 12aa4c64 27-Oct-2010 Brian Swetland <swetland@google.com>

w1: don't allow arbitrary users to remove w1 devices

The search/pullup/add/remove device attributes were 0666 which would allow
arbitrary users to affect the 1 wire bus. Change to 0664 to prevent that.

I found this patch in the Android tree, apparently this has never been
sent upstream so doing it now.

Signed-off-by: Brian Swetland <swetland@google.com>
Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Cc: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# 2c3c8bea 12-May-2010 Chris Wright <chrisw@sous-sol.org>

sysfs: add struct file* to bin_attr callbacks

This allows bin_attr->read,write,mmap callbacks to check file specific data
(such as inode owner) as part of any privilege validation.

Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 73a98fce 22-Dec-2009 Peter Huewe <peterhuewe@gmx.de>

w1: add __init/__exit macros to w1.c

Trivial patch which adds the __init/__exit macros to the module_init/
module_exit functions of

drivers/w1/w1.c

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>


# 40f91de6 06-Jan-2009 Kay Sievers <kay.sievers@vrfy.org>

w1: struct device - replace bus_id with dev_name(), dev_set_name()

CC: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 7dc8f527 15-Oct-2008 David Fries <david@fries.net>

W1: w1.c s/printk/dev_dbg/

s/printk/dev_dbg/

Signed-off-by: David Fries <david@fries.net>
Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# 07e00341 15-Oct-2008 David Fries <david@fries.net>

W1: w1_slave_read_id read bug, use device_attribute

Fix bug reading the id sysfs file. If less than the full 8 bytes were
read, the next read would start at the first byte instead of continuing.
It needed the offset added to memcpy, or the better solution was to
replace it with the device attribute instead of bin attribute.

Signed-off-by: David Fries <david@fries.net>
Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# cd7b28d3 15-Oct-2008 David Fries <david@fries.net>

W1: recode w1_slave_found logic

Simplified the logic in w1_slave_found by using the new
w1_attach_slave_device function to find a slave and mark it as active or
add the device if the crc checks.

Signed-off-by: David Fries <david@fries.net>
Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# 9b467411 15-Oct-2008 David Fries <david@fries.net>

W1: be able to manually add and remove slaves

sysfs entries were added to manually add and remove slave devices. This
is useful if the automatic bus searching is disabled, and the device ids
are already known.

[akpm@linux-foundation.org: fix printk types]
Signed-off-by: David Fries <david@fries.net>
Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# 6a158c0d 15-Oct-2008 David Fries <david@fries.net>

W1: feature, enable hardware strong pullup

Add a strong pullup option to the w1 system. This supplies extra power
for parasite powered devices. There is a w1_master_pullup sysfs entry and
enable_pullup module parameter to enable or disable the strong pullup.

The one wire bus requires at a minimum one wire and ground. The common
wire is used for sending and receiving data as well as supplying power to
devices that are parasite powered of which temperature sensors can be one
example. The bus must be idle and left high while a temperature
conversion is in progress, in addition the normal pullup resister on
larger networks or even higher temperatures might not supply enough power.
The pullup resister can't provide too much pullup current, because
devices need to pull the bus down to write a value. This enables the
strong pullup for supported hardware, which can supply more current when
requested. Unsupported hardware will just delay with the bus high.

The hardware USB 2490 one wire bus master has a bit on some commands which
will enable the strong pullup as soon as the command finishes executing.
To use strong pullup, call the new w1_next_pullup function to register the
duration. The next write command will call set_pullup before sending the
data, and reset the duration to zero once it returns.

Switched from simple_strtol to strict_strtol.

Signed-off-by: David Fries <david@fries.net>
Cc: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# 3c52e4e6 15-Oct-2008 David Fries <david@fries.net>

W1: w1_process, block or sleep

The w1_process thread's sleeping and termination has been modified.
msleep_interruptible was replaced by schedule_timeout and schedule to
allow for kthread_stop and wake_up_process to interrupt the sleep and the
unbounded sleeping when a bus search is disabled. The W1_MASTER_NEED_EXIT
and flags variable were removed as they were redundant with
kthread_should_stop and kthread_stop. If w1_process is sleeping,
requesting a search will immediately wake it up rather than waiting for
the end of msleep_interruptible previously.

Signed-off-by: David Fries <david@fries.net>
Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# 01e14d6d 15-Oct-2008 David Fries <david@fries.net>

W1: don't delay search start

Move the creation of the w1_process thread to after the device has been
initialized. This way w1_process doesn't have to check to see if it has
been initialized and the bus search can proceed without sleeping. That
also eliminates two checks in the w1_process loop. The sleep now happens
at the end of the loop not the beginning.

Also added a comment for why the atomic_set was 2.

Signed-off-by: David Fries <david@fries.net>
Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# 0d671b27 15-Oct-2008 David Fries <david@fries.net>

W1: abort search early on on exit

Early abort if the master driver or the hardware goes away in the middle
of a bus search operation. The alternative is to spam the print buffer up
to 64*64 times with read errors in the case of USB.

Signed-off-by: David Fries <david@fries.net>
Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# c30c9b15 15-Oct-2008 David Fries <david@fries.net>

W1: fix deadlocks and remove w1_control_thread

w1_control_thread was removed which would wake up every second and process
newly registered family codes and complete some final cleanup for a
removed master. Those routines were moved to the threads that were
previously requesting those operations. A new function
w1_reconnect_slaves takes care of reconnecting existing slave devices when
a new family code is registered or removed. The removal case was missing
and would cause a deadlock waiting for the family code reference count to
decrease, which will now happen. A problem with registering a family code
was fixed. A slave device would be unattached if it wasn't yet claimed,
then attached at the end of the list, two unclaimed slaves would cause an
infinite loop.

The struct w1_bus_master.search now takes a pointer to the struct
w1_master device to avoid searching for it, which would have caused a
lock ordering deadlock with the removal of w1_control_thread.

Signed-off-by: David Fries <david@fries.net>
Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# 18a2354d 06-Feb-2008 Evgeniy Polyakov <johnpol@2ka.mipt.ru>

w1: remove unused and confusing variable.

Remvoe variable which actually is not used (except assigning it a value)
and confusing break out of the family checking loop. Found by Harry Mason.

Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Cc: Harry J Mason <hjm03r@ecs.soton.ac.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# a2a6c74d 14-Jan-2008 Evgeniy Polyakov <johnpol@2ka.mipt.ru>

w1: decrement slave counter only in ->release() callback

Decrement the slave counter only in ->release() callback instead of both
in ->release() and w1 control.

Patch is based on debug work and preliminary patch made by Henri Laakso.
Henri noticed in debug that this counter becomes negative after w1 slave
device is physically removed.

Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Cc: Henri Laakso <henri.laakso@wapice.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# 7eff2e7a 14-Aug-2007 Kay Sievers <kay.sievers@vrfy.org>

Driver core: change add_uevent_var to use a struct

This changes the uevent buffer functions to use a struct instead of a
long list of parameters. It does no longer require the caller to do the
proper buffer termination and size accounting, which is currently wrong
in some places. It fixes a known bug where parts of the uevent
environment are overwritten because of wrong index calculations.

Many thanks to Mathieu Desnoyers for finding bugs and improving the
error handling.

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Cc: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# d1cf16c9 24-Sep-2007 Stephen Hemminger <shemminger@linux-foundation.org>

missing null termination in one wire uevent

Need to null terminate environment. Found by inspection while looking for
similar problems to platform uevent bug

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Acked-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# dd00cc48 19-Jul-2007 Yoann Padioleau <padator@wanadoo.fr>

some kmalloc/memset ->kzalloc (tree wide)

Transform some calls to kmalloc/memset to a single kzalloc (or kcalloc).

Here is a short excerpt of the semantic patch performing
this transformation:

@@
type T2;
expression x;
identifier f,fld;
expression E;
expression E1,E2;
expression e1,e2,e3,y;
statement S;
@@

x =
- kmalloc
+ kzalloc
(E1,E2)
... when != \(x->fld=E;\|y=f(...,x,...);\|f(...,x,...);\|x=E;\|while(...) S\|for(e1;e2;e3) S\)
- memset((T2)x,0,E1);

@@
expression E1,E2,E3;
@@

- kzalloc(E1 * E2,E3)
+ kcalloc(E1,E2,E3)

[akpm@linux-foundation.org: get kcalloc args the right way around]
Signed-off-by: Yoann Padioleau <padator@wanadoo.fr>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Acked-by: Russell King <rmk@arm.linux.org.uk>
Cc: Bryan Wu <bryan.wu@analog.com>
Acked-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Dave Airlie <airlied@linux.ie>
Acked-by: Roland Dreier <rolandd@cisco.com>
Cc: Jiri Kosina <jkosina@suse.cz>
Acked-by: Dmitry Torokhov <dtor@mail.ru>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Acked-by: Pierre Ossman <drzeus-list@drzeus.cx>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: "David S. Miller" <davem@davemloft.net>
Acked-by: Greg KH <greg@kroah.com>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# 83144186 17-Jul-2007 Rafael J. Wysocki <rjw@rjwysocki.net>

Freezer: make kernel threads nonfreezable by default

Currently, the freezer treats all tasks as freezable, except for the kernel
threads that explicitly set the PF_NOFREEZE flag for themselves. This
approach is problematic, since it requires every kernel thread to either
set PF_NOFREEZE explicitly, or call try_to_freeze(), even if it doesn't
care for the freezing of tasks at all.

It seems better to only require the kernel threads that want to or need to
be frozen to use some freezer-related code and to remove any
freezer-related code from the other (nonfreezable) kernel threads, which is
done in this patch.

The patch causes all kernel threads to be nonfreezable by default (ie. to
have PF_NOFREEZE set by default) and introduces the set_freezable()
function that should be called by the freezable kernel threads in order to
unset PF_NOFREEZE. It also makes all of the currently freezable kernel
threads call set_freezable(), so it shouldn't cause any (intentional)
change of behaviour to appear. Additionally, it updates documentation to
describe the freezing of tasks more accurately.

[akpm@linux-foundation.org: build fixes]
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Nigel Cunningham <nigel@nigel.suspend2.net>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Gautham R Shenoy <ego@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# 91a69029 08-Jun-2007 Zhang Rui <rui.zhang@intel.com>

sysfs: add parameter "struct bin_attribute *" in .read/.write methods for sysfs binary attributes

Well, first of all, I don't want to change so many files either.

What I do:
Adding a new parameter "struct bin_attribute *" in the
.read/.write methods for the sysfs binary attributes.

In fact, only the four lines change in fs/sysfs/bin.c and
include/linux/sysfs.h do the real work.
But I have to update all the files that use binary attributes
to make them compatible with the new .read and .write methods.
I'm not sure if I missed any. :(

Why I do this:
For a sysfs attribute, we can get a pointer pointing to the
struct attribute in the .show/.store method,
while we can't do this for the binary attributes.
I don't know why this is different, but this does make it not
so handy to use the binary attributes as the regular ones.
So I think this patch is reasonable. :)

Who benefits from it:
The patch that exposes ACPI tables in sysfs
requires such an improvement.
All the table binary attributes share the same .read method.
Parameter "struct bin_attribute *" is used to get
the table signature and instance number which are used to
distinguish different ACPI table binary attributes.

Without this parameter, we need to offer different .read methods
for different ACPI table binary attributes.
This is impossible as there are various ACPI tables on different
platforms, and we don't know what they are until they are loaded.

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 7b595756 13-Jun-2007 Tejun Heo <htejun@gmail.com>

sysfs: kill unnecessary attribute->owner

sysfs is now completely out of driver/module lifetime game. After
deletion, a sysfs node doesn't access anything outside sysfs proper,
so there's no reason to hold onto the attribute owners. Note that
often the wrong modules were accounted for as owners leading to
accessing removed modules.

This patch kills now unnecessary attribute->owner. Note that with
this change, userland holding a sysfs node does not prevent the
backing module from being unloaded.

For more info regarding lifetime rule cleanup, please read the
following message.

http://article.gmane.org/gmane.linux.kernel/510293

(tweaked by Greg to not delete the field just yet, to make it easier to
merge things properly.)

Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Cornelia Huck <cornelia.huck@de.ibm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 60ed34be 08-May-2007 Evgeniy Polyakov <johnpol@2ka.mipt.ru>

W1 printk format warning fix

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# 7dfb7103 06-Dec-2006 Nigel Cunningham <ncunningham@linuxmail.org>

[PATCH] Add include/linux/freezer.h and move definitions from sched.h

Move process freezing functions from include/linux/sched.h to freezer.h, so
that modifications to the freezer or the kernel configuration don't require
recompiling just about everything.

[akpm@osdl.org: fix ueagle driver]
Signed-off-by: Nigel Cunningham <nigel@suspend2.net>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>


# c6976a4e 14-May-2006 Andrew Morton <akpm@osdl.org>

[PATCH] w1: warning fix

drivers/w1/w1.c:423: warning: long long unsigned int format, __u64 arg (arg 8)

u64 is not, never has been and never will be "unsigned long long"!

While we're there, fix up some code layout - it looks awful in an 80-col
display.

Cc: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 2c5bfdac 04-Apr-2006 Evgeniy Polyakov <johnpol@2ka.mipt.ru>

[PATCH] W1: cleanups

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>


# abd52a13 02-Apr-2006 Evgeniy Polyakov <johnpol@2ka.mipt.ru>

[PATCH] w1: Use mutexes instead of semaphores.

Use mutexes instead of semaphores.
Patch tested on x86_64 and i386 with test bus master driver.

Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 12003375 23-Mar-2006 Evgeniy Polyakov <johnpol@2ka.mipt.ru>

[PATCH] w1: Userspace communication protocol over connector.

There are three types of messages between w1 core and userspace:
1. Events. They are generated each time new master or slave device found
either due to automatic or requested search.
2. Userspace commands. Includes read/write and search/alarm search comamnds.
3. Replies to userspace commands.

From: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# f522d239 23-Mar-2006 Evgeniy Polyakov <johnpol@2ka.mipt.ru>

[PATCH] w1: Added default generic read/write operations.

Special file in each w1 slave device's directory called "rw" is created
each time new slave and no appropriate w1 family is registered.
"rw" file supports read and write operations, which allows to perform
almost any kind of operations. Each logical operation is a transaction
in nature, which can contain several (two or one) low-level operations.
Let's see how one can read EEPROM context:
1. one must write control buffer, i.e. buffer containing command byte
and two byte address. At this step bus is reset and appropriate device
is selected using either W1_SKIP_ROM or W1_MATCH_ROM command.
Then provided control buffer is being written to the wire.
2. reading. This will issue reading eeprom response.

It is possible that between 1. and 2. w1 master thread will reset bus for
searching and slave device will be even removed, but in this case 0xff will
be read, since no device was selected.

Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 674a396c 20-Feb-2006 Evgeniy Polyakov <johnpol@2ka.mipt.ru>

[PATCH] w1: use kthread api.

This patch removes old-style kernel thread initialization
and changes w1 to use kthread api.
It is based on Christoph Hellwig <hch@lst.de> work.

Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# f73b5e79 14-Jan-2006 Andrew Morton <akpm@osdl.org>

[PATCH] W1: u64 is not long long

You don't know what type a u64 is, hence you cannot print it without a cast.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# a9fb1c7b 13-Dec-2005 Adrian Bunk <bunk@stusta.de>

[PATCH] w1: misc cleanups

This patch contains the following cleanups:
- make needlessly global code static
- declarations for global code belong into header files
- w1.c: #if 0 the unused struct w1_slave_device

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Acked-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# ccd69940 06-Dec-2005 Evgeniy Polyakov <johnpol@2ka.mipt.ru>

[PATCH] W1: Change the type 'unsigned long' member of 'struct w1_bus_master' to 'void *'.

Signed-off-by: Ben Gardner <bgardner@wabtec.com>
Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 312c004d 16-Nov-2005 Kay Sievers <kay.sievers@suse.de>

[PATCH] driver core: replace "hotplug" by "uevent"

Leave the overloaded "hotplug" word to susbsystems which are handling
real devices. The driver core does not "plug" anything, it just exports
the state to userspace and generates events.

Signed-off-by: Kay Sievers <kay.sievers@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 2d1f87a7 14-Oct-2005 Evgeniy Polyakov <johnpol@2ka.mipt.ru>

[PATCH] Dallas's 1-wire bus compile error

drivers/built-in.o: In function `w1_alloc_dev': undefined reference to `netlink_kernel_create'
drivers/built-in.o: In function `w1_alloc_dev': undefined reference to `sock_release'

Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>


# 7c8f5703 11-Aug-2005 Evgeniy Polyakov <johnpol@2ka.mipt.ru>

[PATCH] w1: Decreased debug level.

Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 3aca692d 11-Aug-2005 Evgeniy Polyakov <johnpol@2ka.mipt.ru>

[PATCH] w1: Detouching bug fixed.

Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# d2a4ef6a 11-Aug-2005 Evgeniy Polyakov <johnpol@2ka.mipt.ru>

[PATCH] w1: Added add/remove slave callbacks.

Patch is based on work from Ben Gardner <bgardner@wabtec.com>

Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# db2d0008 11-Aug-2005 Evgeniy Polyakov <johnpol@2ka.mipt.ru>

[PATCH] w1: Added inline functions on top of container_of().

Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 5e8eb850 11-Aug-2005 Evgeniy Polyakov <johnpol@2ka.mipt.ru>

[PATCH] w1: Fixed 64bit compilation warning.

Fixed 64bit compilation warning.

Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 7f772ed8 11-Aug-2005 Evgeniy Polyakov <johnpol@2ka.mipt.ru>

[PATCH] w1: hotplug support.

Here is W1 hotplug in addition to netlink notifications.

Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 2da5bf80 12-Aug-2005 Evgeniy Polyakov <johnpol@2ka.mipt.ru>

[PATCH] w1: more debug level decrease.

Do not spam syslog each 10 seconds when there is nothing on the wire.

Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>


# 0e65f828 30-Jun-2005 Evgeniy Polyakov <johnpol@2ka.mipt.ru>

[PATCH] w1: fix CRC calculation on bigendian platforms.

In the 2.6.13-rc1 code the "rn" structure is in the wrong-endianness
when passed to w1_attach_slave_device(). This causes problems like the
family and crc being swapped around.

Signed-off-by: Roger Blofeld <blofeldus@yahoo.com>
Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 3e1d1d28 25-Jun-2005 Christoph Lameter <christoph@lameter.com>

[PATCH] Cleanup patch for process freezing

1. Establish a simple API for process freezing defined in linux/include/sched.h:

frozen(process) Check for frozen process
freezing(process) Check if a process is being frozen
freeze(process) Tell a process to freeze (go to refrigerator)
thaw_process(process) Restart process
frozen_process(process) Process is frozen now

2. Remove all references to PF_FREEZE and PF_FROZEN from all
kernel sources except sched.h

3. Fix numerous locations where try_to_freeze is manually done by a driver

4. Remove the argument that is no longer necessary from two function calls.

5. Some whitespace cleanup

6. Clear potential race in refrigerator (provides an open window of PF_FREEZE
cleared before setting PF_FROZEN, recalc_sigpending does not check
PF_FROZEN).

This patch does not address the problem of freeze_processes() violating the rule
that a task may only modify its own flags by setting PF_FREEZE. This is not clean
in an SMP environment. freeze(process) is therefore not SMP safe!

Signed-off-by: Christoph Lameter <christoph@lameter.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>


# 6adf87bd 03-Jun-2005 Evgeniy Polyakov <johnpol@2ka.mipt.ru>

[PATCH] w1: reconnect feature.

I've created reconnect feature - if on start there are no registered families
all new devices will have defailt family, later when driver for appropriate
family is loaded, slaves, which were faound earlier, will still have defult
family instead of right one. Reconnect feature will force control thread to run
through all master devices and all slaves found and search for slaves with
default family id and try to reconnect them.

It does not store newly registered family and does not check only those slaves
which have reg_num.family the same as being registered one - all slaves with
default family are reconnected.

Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 99c5bfe9 03-Jun-2005 Evgeniy Polyakov <johnpol@2ka.mipt.ru>

[PATCH] w1: Adds a default family so that new slave families will show up in sysfs.

Adds a default family so that new slave families will show up in sysfs.

Signed-off-by: Ben Gardner <bgardner@wabtec.com>
Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 2a9d0c17 03-Jun-2005 Evgeniy Polyakov <johnpol@2ka.mipt.ru>

[PATCH] w1: Adds a sysfs entry (w1_master_search) that allows you to disable/enable periodic searches.

Adds a sysfs entry (w1_master_search) that allows you to disable/enable
periodic searches.

Signed-off-by: Ben Gardner <bgardner@wabtec.com>
Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 6b729861 03-Jun-2005 Evgeniy Polyakov <johnpol@2ka.mipt.ru>

[PATCH] w1: Added the triplet w1 master method and changes w1_search() to use it.

Adds the triplet w1 master method and changes w1_search() to use it.

Signed-off-by: Ben Gardner <bgardner@wabtec.com>
Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# ca775c62 20-May-2005 Evgeniy Polyakov <johnpol@2ka.mipt.ru>

[PATCH] w1: new family structure.

Removed some fields which are not required.
First step for writing operations.
Now only read and read name remain.
Patch depends on w1 cleanups patch.

Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 7785925d 20-May-2005 Evgeniy Polyakov <johnpol@2ka.mipt.ru>

[PATCH] w1: cleanups.

- white space changes.
- list_for_each_entry/list_for_each_entry_safe and reverse changes.
- small coding style changes.
- removed redundant NULL checks.
- use attribute group and macros instead of direct device attributes.
Patch is havily based on work from Adrian Bunk and Dmitry Torokhov,
thanks guys.

Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 060b8845 17-May-2005 Yani Ioannou <yani.ioannou@gmail.com>

[PATCH] Driver Core: drivers/usb/input/aiptek.c - drivers/zorro/zorro-sysfs.c: update device attribute callbacks

Signed-off-by: Yani Ioannou <yani.ioannou@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 8523ff45 18-Apr-2005 Evgeniy Polyakov <johnpol@2ka.mipt.ru>

[PATCH] w1: real fix for big endian machines.

Real fix for big endian machines - crc must be calculated
using little endian byte order.

Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 1da177e4 16-Apr-2005 Linus Torvalds <torvalds@ppc970.osdl.org>

Linux-2.6.12-rc2

Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.

Let it rip!