Merge remote-tracking branches 'spi/topic/sunxi', 'spi/topic/tegra114', 'spi/topic...
[cascardo/linux.git] / drivers / spi / spi-txx9.c
index 523f13d..820b499 100644 (file)
@@ -306,12 +306,8 @@ static int txx9spi_transfer(struct spi_device *spi, struct spi_message *m)
 
        /* check each transfer's parameters */
        list_for_each_entry(t, &m->transfers, transfer_list) {
-               u8 bits_per_word = t->bits_per_word;
-
                if (!t->tx_buf && !t->rx_buf && t->len)
                        return -EINVAL;
-               if (t->len & ((bits_per_word >> 3) - 1))
-                       return -EINVAL;
        }
 
        spin_lock_irqsave(&c->lock, flags);
@@ -358,13 +354,8 @@ static int txx9spi_probe(struct platform_device *dev)
        master->max_speed_hz = c->baseclk / (SPI_MIN_DIVIDER + 1);
 
        res = platform_get_resource(dev, IORESOURCE_MEM, 0);
-       if (!res)
-               goto exit_busy;
-       if (!devm_request_mem_region(&dev->dev, res->start, resource_size(res),
-                                    "spi_txx9"))
-               goto exit_busy;
-       c->membase = devm_ioremap(&dev->dev, res->start, resource_size(res));
-       if (!c->membase)
+       c->membase = devm_ioremap_resource(&dev->dev, res);
+       if (IS_ERR(c->membase))
                goto exit_busy;
 
        /* enter config mode */