Re: [PATCH V3 3/4] gpio: tegra: Get rid of all file scoped global variables

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

 



On 04/20/2016 07:30 AM, Laxman Dewangan wrote:
Move the file scoped multiple global variable from Tegra GPIO
driver to the structure and make this as gpiochip data which
can be referred from GPIO chip callbacks.

diff --git a/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c

+#define GPIO_MSK_CNF(t, x)	(GPIO_REG(t, x) + t->soc->upper_offset + 0x00)
+#define GPIO_MSK_OE(t, x)	(GPIO_REG(t, x) + t->soc->upper_offset + 0x10)
+#define GPIO_MSK_OUT(t, x)	(GPIO_REG(t, x) + t->soc->upper_offset + 0X20)
+#define GPIO_MSK_INT_STA(t, x)	(GPIO_REG(t, x) + t->soc->upper_offset + 0x40)
+#define GPIO_MSK_INT_ENB(t, x)	(GPIO_REG(t, x) + t->soc->upper_offset + 0x50)
+#define GPIO_MSK_INT_LVL(t, x)	(GPIO_REG(t, x) + t->soc->upper_offset + 0x60)
+#define GPIO_MSK_DBC_EN(t, x)	(GPIO_REG(t, x) + t->soc->upper_offset + 0x30)

DBC_EN/0x30 should be sorted correctly with the rest, and likely added in patch 4 instead.

@@ -276,19 +307,25 @@ static void tegra_gpio_irq_handler(struct irq_desc *desc)

+	struct tegra_gpio_info *tgi = bank->tgi;
+

  	chained_irq_enter(chip, desc);

No need for 2 blank lines there.

@@ -410,7 +462,7 @@ static int dbg_gpio_show(struct seq_file *s, void *unused)

  static int dbg_gpio_open(struct inode *inode, struct file *file)
  {
-	return single_open(file, dbg_gpio_show, &inode->i_private);
+	return single_open(file, dbg_gpio_show, inode->i_private);

Can you explain that change? I'm not sure it's correct, but don't know why it was made.

Once those are fixed,
Reviewed-by: Stephen Warren <swarren@xxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux