diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/core/dev.c | 2 | ||||
-rw-r--r-- | net/core/netprio_cgroup.c | 8 | ||||
-rw-r--r-- | net/ipv4/tcp.c | 4 | ||||
-rw-r--r-- | net/netfilter/ipset/Kconfig | 2 | ||||
-rw-r--r-- | net/nfc/digital_dep.c | 2 | ||||
-rw-r--r-- | net/nfc/hci/llc_shdlc.c | 2 | ||||
-rw-r--r-- | net/rfkill/rfkill-gpio.c | 77 |
7 files changed, 44 insertions, 53 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index 0ce469e5ec80..2e0c6a90f6f2 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -6229,7 +6229,7 @@ void netdev_freemem(struct net_device *dev) * @rxqs: the number of RX subqueues to allocate * * Allocates a struct net_device with private data area for driver use - * and performs basic initialization. Also allocates subquue structs + * and performs basic initialization. Also allocates subqueue structs * for each queue on the device. */ struct net_device *alloc_netdev_mqs(int sizeof_priv, const char *name, diff --git a/net/core/netprio_cgroup.c b/net/core/netprio_cgroup.c index 9b7cf6c85f82..56cbb69ba024 100644 --- a/net/core/netprio_cgroup.c +++ b/net/core/netprio_cgroup.c @@ -173,14 +173,14 @@ static u64 read_prioidx(struct cgroup_subsys_state *css, struct cftype *cft) return css->cgroup->id; } -static int read_priomap(struct cgroup_subsys_state *css, struct cftype *cft, - struct cgroup_map_cb *cb) +static int read_priomap(struct seq_file *sf, void *v) { struct net_device *dev; rcu_read_lock(); for_each_netdev_rcu(&init_net, dev) - cb->fill(cb, dev->name, netprio_prio(css, dev)); + seq_printf(sf, "%s %u\n", dev->name, + netprio_prio(seq_css(sf), dev)); rcu_read_unlock(); return 0; } @@ -238,7 +238,7 @@ static struct cftype ss_files[] = { }, { .name = "ifpriomap", - .read_map = read_priomap, + .seq_show = read_priomap, .write_string = write_priomap, }, { } /* terminate */ diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index c4638e6f0238..82de78603686 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c @@ -1623,11 +1623,11 @@ int tcp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, (len > sysctl_tcp_dma_copybreak) && !(flags & MSG_PEEK) && !sysctl_tcp_low_latency && net_dma_find_channel()) { - preempt_enable_no_resched(); + preempt_enable(); tp->ucopy.pinned_list = dma_pin_iovec_pages(msg->msg_iov, len); } else { - preempt_enable_no_resched(); + preempt_enable(); } } #endif diff --git a/net/netfilter/ipset/Kconfig b/net/netfilter/ipset/Kconfig index a2d6263b6c64..44cd4f58adf0 100644 --- a/net/netfilter/ipset/Kconfig +++ b/net/netfilter/ipset/Kconfig @@ -21,7 +21,7 @@ config IP_SET_MAX You can define here default value of the maximum number of IP sets for the kernel. - The value can be overriden by the 'max_sets' module + The value can be overridden by the 'max_sets' module parameter of the 'ip_set' module. config IP_SET_BITMAP_IP diff --git a/net/nfc/digital_dep.c b/net/nfc/digital_dep.c index 07bbc24fb4c7..8b362e802d2f 100644 --- a/net/nfc/digital_dep.c +++ b/net/nfc/digital_dep.c @@ -563,7 +563,7 @@ static void digital_tg_recv_psl_req(struct nfc_digital_dev *ddev, void *arg, rf_tech = NFC_DIGITAL_RF_TECH_424F; break; default: - pr_err("Unsuported dsi value %d\n", dsi); + pr_err("Unsupported dsi value %d\n", dsi); goto exit; } diff --git a/net/nfc/hci/llc_shdlc.c b/net/nfc/hci/llc_shdlc.c index 27b313befc35..3e53c1e029dc 100644 --- a/net/nfc/hci/llc_shdlc.c +++ b/net/nfc/hci/llc_shdlc.c @@ -300,7 +300,7 @@ static void llc_shdlc_rcv_rej(struct llc_shdlc *shdlc, int y_nr) { struct sk_buff *skb; - pr_debug("remote asks retransmition from frame %d\n", y_nr); + pr_debug("remote asks retransmission from frame %d\n", y_nr); if (llc_shdlc_x_lteq_y_lt_z(shdlc->dnr, y_nr, shdlc->ns)) { if (shdlc->t2_active) { diff --git a/net/rfkill/rfkill-gpio.c b/net/rfkill/rfkill-gpio.c index 5620d3c07479..bd2a5b90400c 100644 --- a/net/rfkill/rfkill-gpio.c +++ b/net/rfkill/rfkill-gpio.c @@ -25,15 +25,15 @@ #include <linux/clk.h> #include <linux/slab.h> #include <linux/acpi.h> -#include <linux/acpi_gpio.h> +#include <linux/gpio/consumer.h> #include <linux/rfkill-gpio.h> struct rfkill_gpio_data { const char *name; enum rfkill_type type; - int reset_gpio; - int shutdown_gpio; + struct gpio_desc *reset_gpio; + struct gpio_desc *shutdown_gpio; struct rfkill *rfkill_dev; char *reset_name; @@ -48,19 +48,15 @@ static int rfkill_gpio_set_power(void *data, bool blocked) struct rfkill_gpio_data *rfkill = data; if (blocked) { - if (gpio_is_valid(rfkill->shutdown_gpio)) - gpio_set_value(rfkill->shutdown_gpio, 0); - if (gpio_is_valid(rfkill->reset_gpio)) - gpio_set_value(rfkill->reset_gpio, 0); + gpiod_set_value(rfkill->shutdown_gpio, 0); + gpiod_set_value(rfkill->reset_gpio, 0); if (!IS_ERR(rfkill->clk) && rfkill->clk_enabled) clk_disable(rfkill->clk); } else { if (!IS_ERR(rfkill->clk) && !rfkill->clk_enabled) clk_enable(rfkill->clk); - if (gpio_is_valid(rfkill->reset_gpio)) - gpio_set_value(rfkill->reset_gpio, 1); - if (gpio_is_valid(rfkill->shutdown_gpio)) - gpio_set_value(rfkill->shutdown_gpio, 1); + gpiod_set_value(rfkill->reset_gpio, 1); + gpiod_set_value(rfkill->shutdown_gpio, 1); } rfkill->clk_enabled = blocked; @@ -83,8 +79,6 @@ static int rfkill_gpio_acpi_probe(struct device *dev, rfkill->name = dev_name(dev); rfkill->type = (unsigned)id->driver_data; - rfkill->reset_gpio = acpi_get_gpio_by_index(dev, 0, NULL); - rfkill->shutdown_gpio = acpi_get_gpio_by_index(dev, 1, NULL); return 0; } @@ -94,8 +88,9 @@ static int rfkill_gpio_probe(struct platform_device *pdev) struct rfkill_gpio_platform_data *pdata = pdev->dev.platform_data; struct rfkill_gpio_data *rfkill; const char *clk_name = NULL; - int ret = 0; - int len = 0; + struct gpio_desc *gpio; + int ret; + int len; rfkill = devm_kzalloc(&pdev->dev, sizeof(*rfkill), GFP_KERNEL); if (!rfkill) @@ -109,28 +104,10 @@ static int rfkill_gpio_probe(struct platform_device *pdev) clk_name = pdata->power_clk_name; rfkill->name = pdata->name; rfkill->type = pdata->type; - rfkill->reset_gpio = pdata->reset_gpio; - rfkill->shutdown_gpio = pdata->shutdown_gpio; } else { return -ENODEV; } - /* make sure at-least one of the GPIO is defined and that - * a name is specified for this instance */ - if ((!gpio_is_valid(rfkill->reset_gpio) && - !gpio_is_valid(rfkill->shutdown_gpio)) || !rfkill->name) { - pr_warn("%s: invalid platform data\n", __func__); - return -EINVAL; - } - - if (pdata && pdata->gpio_runtime_setup) { - ret = pdata->gpio_runtime_setup(pdev); - if (ret) { - pr_warn("%s: can't set up gpio\n", __func__); - return ret; - } - } - len = strlen(rfkill->name); rfkill->reset_name = devm_kzalloc(&pdev->dev, len + 7, GFP_KERNEL); if (!rfkill->reset_name) @@ -145,20 +122,34 @@ static int rfkill_gpio_probe(struct platform_device *pdev) rfkill->clk = devm_clk_get(&pdev->dev, clk_name); - if (gpio_is_valid(rfkill->reset_gpio)) { - ret = devm_gpio_request_one(&pdev->dev, rfkill->reset_gpio, - 0, rfkill->reset_name); - if (ret) { - pr_warn("%s: failed to get reset gpio.\n", __func__); + gpio = devm_gpiod_get_index(&pdev->dev, rfkill->reset_name, 0); + if (!IS_ERR(gpio)) { + ret = gpiod_direction_output(gpio, 0); + if (ret) return ret; - } + rfkill->reset_gpio = gpio; + } + + gpio = devm_gpiod_get_index(&pdev->dev, rfkill->shutdown_name, 1); + if (!IS_ERR(gpio)) { + ret = gpiod_direction_output(gpio, 0); + if (ret) + return ret; + rfkill->shutdown_gpio = gpio; } - if (gpio_is_valid(rfkill->shutdown_gpio)) { - ret = devm_gpio_request_one(&pdev->dev, rfkill->shutdown_gpio, - 0, rfkill->shutdown_name); + /* Make sure at-least one of the GPIO is defined and that + * a name is specified for this instance + */ + if ((!rfkill->reset_gpio && !rfkill->shutdown_gpio) || !rfkill->name) { + dev_err(&pdev->dev, "invalid platform data\n"); + return -EINVAL; + } + + if (pdata && pdata->gpio_runtime_setup) { + ret = pdata->gpio_runtime_setup(pdev); if (ret) { - pr_warn("%s: failed to get shutdown gpio.\n", __func__); + dev_err(&pdev->dev, "can't set up gpio\n"); return ret; } } |