]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - drivers/spi/mpc52xx_spi.c
nand: mxs: use CONFIG_ARCH_MX6 instead of CONFIG_SOC_MX6Q
[karo-tx-uboot.git] / drivers / spi / mpc52xx_spi.c
index 3e96b3f9f3b88fa997667a931650d76d8bdf9667..4613bec2aa5893ee8fc95be92fa152a597197cfb 100644 (file)
@@ -3,23 +3,7 @@
  * Frank Bodammer <frank.bodammer@gcd-solutions.de>
  * (C) Copyright 2009 Semihalf, Grzegorz Bernacki
  *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
+ * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
@@ -48,13 +32,10 @@ struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs,
 {
        struct spi_slave *slave;
 
-       slave = malloc(sizeof(struct spi_slave));
+       slave = spi_alloc_slave_base(bus, cs);
        if (!slave)
                return NULL;
 
-       slave->bus = bus;
-       slave->cs = cs;
-
        return slave;
 }