Search Linux Wireless

Re: [PATCH] v5 ath10k: add LED and GPIO controlling support for various chipsets

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 18.02.2018 um 15:33 schrieb Bo YU:
Hi,
I am just wondering about something.I am a newbies.

On Sun, Feb 18, 2018 at 01:03:00PM +0100, s.gottschall@xxxxxxxxxx wrote:


+#ifdef CONFIG_GPIOLIB
+
+static int ath10k_gpio_pin_cfg_input(struct gpio_chip *chip, unsigned offset)
+{
+    struct ath10k_gpiocontrol *gpio = container_of(chip, struct ath10k_gpiocontrol, gchip); +    ath10k_wmi_gpio_config(gpio->ar, offset, 1, WMI_GPIO_PULL_NONE, WMI_GPIO_INTTYPE_DISABLE); // configure to input
If i remember right,comment style in kernel code would better to use
/* .. */. Same the below comment.
true
+ +/* register GPIO chip */
+static int ath10k_register_gpio_chip(struct ath10k *ar)
+{
+    struct ath10k_gpiocontrol *gpio;
+    gpio = kzalloc(sizeof(struct ath10k_gpiocontrol), GFP_KERNEL);
+    if (!gpio) {
+        return -1;
There is rare value returned after allocing memory from kernel.Maybe
"return -ENOMEM"?
not really relevant since the return check just checks for value present and not for value type
but i applied it for next patch version

--
Mit freundlichen Grüssen / Regards

Sebastian Gottschall / CTO

NewMedia-NET GmbH - DD-WRT
Firmensitz:  Stubenwaldallee 21a, 64625 Bensheim
Registergericht: Amtsgericht Darmstadt, HRB 25473
Geschäftsführer: Peter Steinhäuser, Christian Scheele
http://www.dd-wrt.com
email: s.gottschall@xxxxxxxxxx
Tel.: +496251-582650 / Fax: +496251-5826565




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux