X-Git-Url: https://git.kernelconcepts.de/?a=blobdiff_plain;f=drivers%2Fspi%2Fmpc52xx_spi.c;h=4613bec2aa5893ee8fc95be92fa152a597197cfb;hb=bd64ec234dd1483d6742cf71c63e6984256ddf8d;hp=3e96b3f9f3b88fa997667a931650d76d8bdf9667;hpb=59869ca72df8bc4e4ffa9dd17cb6673bbe010272;p=karo-tx-uboot.git diff --git a/drivers/spi/mpc52xx_spi.c b/drivers/spi/mpc52xx_spi.c index 3e96b3f9f3..4613bec2aa 100644 --- a/drivers/spi/mpc52xx_spi.c +++ b/drivers/spi/mpc52xx_spi.c @@ -3,23 +3,7 @@ * Frank Bodammer * (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 @@ -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; }