| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * w1_ds2805 - w1 family 0d (DS28E05) driver |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright (c) 2016 Andrew Worsley amworsley@gmail.com |
|---|
| 5 | | - * |
|---|
| 6 | | - * This source code is licensed under the GNU General Public License, |
|---|
| 7 | | - * Version 2. See the file COPYING for more details. |
|---|
| 8 | 6 | */ |
|---|
| 9 | 7 | |
|---|
| 10 | 8 | #include <linux/kernel.h> |
|---|
| .. | .. |
|---|
| 283 | 281 | sysfs_remove_bin_file(&sl->dev.kobj, &w1_f0d_bin_attr); |
|---|
| 284 | 282 | } |
|---|
| 285 | 283 | |
|---|
| 286 | | -static struct w1_family_ops w1_f0d_fops = { |
|---|
| 284 | +static const struct w1_family_ops w1_f0d_fops = { |
|---|
| 287 | 285 | .add_slave = w1_f0d_add_slave, |
|---|
| 288 | 286 | .remove_slave = w1_f0d_remove_slave, |
|---|
| 289 | 287 | }; |
|---|
| 290 | 288 | |
|---|
| 291 | | -static struct w1_family w1_family_2d = { |
|---|
| 289 | +static struct w1_family w1_family_0d = { |
|---|
| 292 | 290 | .fid = W1_EEPROM_DS2805, |
|---|
| 293 | 291 | .fops = &w1_f0d_fops, |
|---|
| 294 | 292 | }; |
|---|
| .. | .. |
|---|
| 296 | 294 | static int __init w1_f0d_init(void) |
|---|
| 297 | 295 | { |
|---|
| 298 | 296 | pr_info("%s()\n", __func__); |
|---|
| 299 | | - return w1_register_family(&w1_family_2d); |
|---|
| 297 | + return w1_register_family(&w1_family_0d); |
|---|
| 300 | 298 | } |
|---|
| 301 | 299 | |
|---|
| 302 | 300 | static void __exit w1_f0d_fini(void) |
|---|
| 303 | 301 | { |
|---|
| 304 | 302 | pr_info("%s()\n", __func__); |
|---|
| 305 | | - w1_unregister_family(&w1_family_2d); |
|---|
| 303 | + w1_unregister_family(&w1_family_0d); |
|---|
| 306 | 304 | } |
|---|
| 307 | 305 | |
|---|
| 308 | 306 | module_init(w1_f0d_init); |
|---|