]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - drivers/memory/atmel-ebi.c
cfg80211: fix memory leak in cfg80211_cqm_rssi_update
[linux.git] / drivers / memory / atmel-ebi.c
index 0322df9dc2497288f94a818b83bff4b42b15264f..14386d0b5f57800a9b68c2f2d10cd7df1d459488 100644 (file)
@@ -1,12 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * EBI driver for Atmel chips
  * inspired by the fsl weim bus driver
  *
  * Copyright (C) 2013 Jean-Jacques Hiblot <jjhiblot@traphandler.com>
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2. This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
  */
 
 #include <linux/clk.h>
@@ -19,6 +16,8 @@
 #include <linux/regmap.h>
 #include <soc/at91/atmel-sfr.h>
 
+#define AT91_EBI_NUM_CS                8
+
 struct atmel_ebi_dev_config {
        int cs;
        struct atmel_smc_cs_conf smcconf;
@@ -314,7 +313,7 @@ static int atmel_ebi_dev_setup(struct atmel_ebi *ebi, struct device_node *np,
                if (ret)
                        return ret;
 
-               if (cs >= AT91_MATRIX_EBI_NUM_CS ||
+               if (cs >= AT91_EBI_NUM_CS ||
                    !(ebi->caps->available_cs & BIT(cs))) {
                        dev_err(dev, "invalid reg property in %pOF\n", np);
                        return -EINVAL;
@@ -344,7 +343,7 @@ static int atmel_ebi_dev_setup(struct atmel_ebi *ebi, struct device_node *np,
                apply = true;
 
        i = 0;
-       for_each_set_bit(cs, &cslines, AT91_MATRIX_EBI_NUM_CS) {
+       for_each_set_bit(cs, &cslines, AT91_EBI_NUM_CS) {
                ebid->configs[i].cs = cs;
 
                if (apply) {