1-Wire bus drivers for v6.11

Just two cleanups for W1 core code.
 -----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEE3dJiKD0RGyM7briowTdm5oaLg9cFAmaDqNIQHGtyemtAa2Vy
 bmVsLm9yZwAKCRDBN2bmhouD115hEACNFY/hz5kJxLdXlWRIiZpOhJCjaXl4+d/p
 zZtuDcox7NzXq+Vcn/3ZbrtrwvCeU/iTTGPBAJwexZXrsl+PDgHD4K7G0X8xx/i5
 Hz2Pk6/m9Z9SGF5819E0QVFkWXP1ad/fH5nEBTi5IHaHxcmmB0e0GsrGlg5rHPZ9
 PUoj4gWp4wllKGbSW0dRbAeQMjdGHo29HtXS5q21AECAOxcXm/lZdQSnlok38xdX
 yUk76n1BEPjBCA9CqnKO9Be9X/AhjVA0xdHRbapgjI7/oNtZBA5Ak4qkic5dufHa
 9jt10Sk0IatcFfmh2EX352B45EiziyB8i3BhMf2KtJ3mk5x5ZJYWPMgDd1Vy+V/p
 V+BMJeRLcipxtnwC1lGdX55aVg8f2csMw1SJh/F1DZyef/M4RyVTyPci6G9R99pW
 vEGqc4Qhd3lNxnXtqHsk7qU76aSx3/kMfgG6ivlBtOrPrj66o+xmxqDcjms5JHHV
 /eTxp00p/UMbUPKETzWPfXoc599GsdKyOea/8HpwUP0jSbMlM586af9vNZh2f+7h
 G9MLam16yMoV3yeIm7HSqQNH9P5VzYjSPEpkXehbYMaynzn/vrLkRevDvz5zHylV
 s+1jXE05shXJgb6FyoXSsERTAKsr3JXHLzAUMUD1sVq+d2RE7ev6yavX/MhBxQN7
 DH4U+E8A7w==
 =NzYh
 -----END PGP SIGNATURE-----

Merge tag 'w1-drv-6.11' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/krzk/linux-w1 into char-misc-next

Krzysztof writes:

1-Wire bus drivers for v6.11

Just two cleanups for W1 core code.

* tag 'w1-drv-6.11' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/krzk/linux-w1:
  w1: Drop allocation error message
  w1: Add missing newline and fix typos in w1_bus_master comment
This commit is contained in:
Greg Kroah-Hartman 2024-07-03 15:49:05 +02:00
commit f6663a96d8
3 changed files with 6 additions and 9 deletions

View File

@ -504,7 +504,7 @@ static ssize_t w1_master_attribute_store_remove(struct device *dev,
if (result == 0)
result = count;
} else {
dev_info(dev, "Device %02x-%012llx doesn't exists\n", rn.family,
dev_info(dev, "Device %02x-%012llx doesn't exist\n", rn.family,
(unsigned long long)rn.id);
result = -EINVAL;
}

View File

@ -32,12 +32,8 @@ static struct w1_master *w1_alloc_dev(u32 id, int slave_count, int slave_ttl,
* We are in process context(kernel thread), so can sleep.
*/
dev = kzalloc(sizeof(struct w1_master) + sizeof(struct w1_bus_master), GFP_KERNEL);
if (!dev) {
pr_err("Failed to allocate %zd bytes for new w1 device.\n",
sizeof(struct w1_master));
if (!dev)
return NULL;
}
dev->bus_master = (struct w1_bus_master *)(dev + 1);

View File

@ -85,7 +85,8 @@ typedef void (*w1_slave_found_callback)(struct w1_master *, u64);
*
* @data: the first parameter in all the functions below
*
* @read_bit: Sample the line level @return the level read (0 or 1)
* @read_bit: Sample the line level
* @return the level read (0 or 1)
*
* @write_bit: Sets the line level
*
@ -95,7 +96,7 @@ typedef void (*w1_slave_found_callback)(struct w1_master *, u64);
* touch_bit(1) = write-1 / read cycle
* @return the bit read (0 or 1)
*
* @read_byte: Reads a bytes. Same as 8 touch_bit(1) calls.
* @read_byte: Reads a byte. Same as 8 touch_bit(1) calls.
* @return the byte read
*
* @write_byte: Writes a byte. Same as 8 touch_bit(x) calls.
@ -114,7 +115,7 @@ typedef void (*w1_slave_found_callback)(struct w1_master *, u64);
* @set_pullup: Put out a strong pull-up pulse of the specified duration.
* @return -1=Error, 0=completed
*
* @search: Really nice hardware can handles the different types of ROM search
* @search: Really nice hardware can handle the different types of ROM search
* w1_master* is passed to the slave found callback.
* u8 is search_type, W1_SEARCH or W1_ALARM_SEARCH
*