]> rtime.felk.cvut.cz Git - zynq/linux.git/commitdiff
gpio: gpio-zynq: Fix warnings in the driver
authorNava kishore Manne <nava.manne@xilinx.com>
Wed, 19 Apr 2017 12:11:18 +0000 (17:41 +0530)
committerMichal Simek <michal.simek@xilinx.com>
Tue, 20 Jun 2017 12:13:23 +0000 (14:13 +0200)
This patch fixes the below warning
-->Block comments should align the * on each line.
        -->suspect code indent for conditional statements.
        -->Prefer 'unsigned int' to bare use of 'unsigned'

Signed-off-by: Nava kishore Manne <navam@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
drivers/gpio/gpio-zynq.c

index 6f66baf46046e3da19f208b8eb7c1d557f51db64..af524c936dd12b8301c4e77275806ef45dd17fc4 100644 (file)
@@ -139,7 +139,7 @@ struct zynq_gpio {
  * @max_bank:  maximum number of gpio banks
  * @bank_min:  this array represents bank's min pin
  * @bank_max:  this array represents bank's max pin
-*/
+ */
 struct zynq_platform_data {
        const char *label;
        u32 quirks;
@@ -174,10 +174,10 @@ static inline void zynq_gpio_get_bank_pin(unsigned int pin_num,
        for (bank = 0; bank < gpio->p_data->max_bank; bank++) {
                if ((pin_num >= gpio->p_data->bank_min[bank]) &&
                        (pin_num <= gpio->p_data->bank_max[bank])) {
-                               *bank_num = bank;
-                               *bank_pin_num = pin_num -
-                                               gpio->p_data->bank_min[bank];
-                               return;
+                       *bank_num = bank;
+                       *bank_pin_num = pin_num -
+                                       gpio->p_data->bank_min[bank];
+                       return;
                }
        }
 
@@ -709,7 +709,7 @@ static int __maybe_unused zynq_gpio_runtime_resume(struct device *dev)
        return clk_prepare_enable(gpio->clk);
 }
 
-static int zynq_gpio_request(struct gpio_chip *chip, unsigned offset)
+static int zynq_gpio_request(struct gpio_chip *chip, unsigned int offset)
 {
        int ret;
 
@@ -722,7 +722,7 @@ static int zynq_gpio_request(struct gpio_chip *chip, unsigned offset)
        return ret < 0 ? ret : 0;
 }
 
-static void zynq_gpio_free(struct gpio_chip *chip, unsigned offset)
+static void zynq_gpio_free(struct gpio_chip *chip, unsigned int offset)
 {
        pm_runtime_put(chip->parent);
 }