.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * Copyright(c) 2011 - 2012 Intel Corporation. All rights reserved. |
---|
3 | | - * |
---|
4 | | - * This program is free software; you can redistribute it and/or modify it |
---|
5 | | - * under the terms and conditions of the GNU General Public License, |
---|
6 | | - * version 2, as published by the Free Software Foundation. |
---|
7 | | - * |
---|
8 | | - * This program is distributed in the hope it will be useful, but WITHOUT |
---|
9 | | - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
---|
10 | | - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
---|
11 | | - * more details. |
---|
12 | | - * |
---|
13 | | - * You should have received a copy of the GNU General Public License along with |
---|
14 | | - * this program; if not, write to the Free Software Foundation, Inc., |
---|
15 | | - * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. |
---|
16 | 4 | * |
---|
17 | 5 | * Maintained at www.Open-FCoE.org |
---|
18 | 6 | */ |
---|
.. | .. |
---|
671 | 659 | .release = fcoe_fcf_device_release, |
---|
672 | 660 | }; |
---|
673 | 661 | |
---|
674 | | -static BUS_ATTR(ctlr_create, S_IWUSR, NULL, fcoe_ctlr_create_store); |
---|
675 | | -static BUS_ATTR(ctlr_destroy, S_IWUSR, NULL, fcoe_ctlr_destroy_store); |
---|
| 662 | +static ssize_t ctlr_create_store(struct bus_type *bus, const char *buf, |
---|
| 663 | + size_t count) |
---|
| 664 | +{ |
---|
| 665 | + return fcoe_ctlr_create_store(bus, buf, count); |
---|
| 666 | +} |
---|
| 667 | +static BUS_ATTR_WO(ctlr_create); |
---|
| 668 | + |
---|
| 669 | +static ssize_t ctlr_destroy_store(struct bus_type *bus, const char *buf, |
---|
| 670 | + size_t count) |
---|
| 671 | +{ |
---|
| 672 | + return fcoe_ctlr_destroy_store(bus, buf, count); |
---|
| 673 | +} |
---|
| 674 | +static BUS_ATTR_WO(ctlr_destroy); |
---|
676 | 675 | |
---|
677 | 676 | static struct attribute *fcoe_bus_attrs[] = { |
---|
678 | 677 | &bus_attr_ctlr_create.attr, |
---|
.. | .. |
---|
1054 | 1053 | |
---|
1055 | 1054 | int __init fcoe_sysfs_setup(void) |
---|
1056 | 1055 | { |
---|
1057 | | - int error; |
---|
1058 | | - |
---|
1059 | 1056 | atomic_set(&ctlr_num, 0); |
---|
1060 | 1057 | atomic_set(&fcf_num, 0); |
---|
1061 | 1058 | |
---|
1062 | | - error = bus_register(&fcoe_bus_type); |
---|
1063 | | - if (error) |
---|
1064 | | - return error; |
---|
1065 | | - |
---|
1066 | | - return 0; |
---|
| 1059 | + return bus_register(&fcoe_bus_type); |
---|
1067 | 1060 | } |
---|
1068 | 1061 | |
---|
1069 | 1062 | void __exit fcoe_sysfs_teardown(void) |
---|