spi-clps711x.c (161b96c383c442f4d7dabbb8500a5fbd551b344d) | spi-clps711x.c (fd4a319bc933ae93e68935b21924a9ca4ba2d060) |
---|---|
1/* 2 * CLPS711X SPI bus driver 3 * 4 * Copyright (C) 2012 Alexander Shiyan <shc_work@mail.ru> 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or --- 149 unchanged lines hidden (view full) --- 158 data = hw->tx_buf ? hw->tx_buf[hw->count] : 0; 159 clps_writel(data | SYNCIO_FRMLEN(8) | SYNCIO_TXFRMEN, SYNCIO); 160 } else 161 complete(&hw->done); 162 163 return IRQ_HANDLED; 164} 165 | 1/* 2 * CLPS711X SPI bus driver 3 * 4 * Copyright (C) 2012 Alexander Shiyan <shc_work@mail.ru> 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or --- 149 unchanged lines hidden (view full) --- 158 data = hw->tx_buf ? hw->tx_buf[hw->count] : 0; 159 clps_writel(data | SYNCIO_FRMLEN(8) | SYNCIO_TXFRMEN, SYNCIO); 160 } else 161 complete(&hw->done); 162 163 return IRQ_HANDLED; 164} 165 |
166static int __devinit spi_clps711x_probe(struct platform_device *pdev) | 166static int spi_clps711x_probe(struct platform_device *pdev) |
167{ 168 int i, ret; 169 struct spi_master *master; 170 struct spi_clps711x_data *hw; 171 struct spi_clps711x_pdata *pdata = dev_get_platdata(&pdev->dev); 172 173 if (!pdata) { 174 dev_err(&pdev->dev, "No platform data supplied\n"); --- 81 unchanged lines hidden (view full) --- 256 257 platform_set_drvdata(pdev, NULL); 258 spi_master_put(master); 259 kfree(master); 260 261 return ret; 262} 263 | 167{ 168 int i, ret; 169 struct spi_master *master; 170 struct spi_clps711x_data *hw; 171 struct spi_clps711x_pdata *pdata = dev_get_platdata(&pdev->dev); 172 173 if (!pdata) { 174 dev_err(&pdev->dev, "No platform data supplied\n"); --- 81 unchanged lines hidden (view full) --- 256 257 platform_set_drvdata(pdev, NULL); 258 spi_master_put(master); 259 kfree(master); 260 261 return ret; 262} 263 |
264static int __devexit spi_clps711x_remove(struct platform_device *pdev) | 264static int spi_clps711x_remove(struct platform_device *pdev) |
265{ 266 int i; 267 struct spi_master *master = platform_get_drvdata(pdev); 268 struct spi_clps711x_data *hw = spi_master_get_devdata(master); 269 270 devm_free_irq(&pdev->dev, IRQ_SSEOTI, hw); 271 272 for (i = 0; i < master->num_chipselect; i++) --- 9 unchanged lines hidden (view full) --- 282} 283 284static struct platform_driver clps711x_spi_driver = { 285 .driver = { 286 .name = DRIVER_NAME, 287 .owner = THIS_MODULE, 288 }, 289 .probe = spi_clps711x_probe, | 265{ 266 int i; 267 struct spi_master *master = platform_get_drvdata(pdev); 268 struct spi_clps711x_data *hw = spi_master_get_devdata(master); 269 270 devm_free_irq(&pdev->dev, IRQ_SSEOTI, hw); 271 272 for (i = 0; i < master->num_chipselect; i++) --- 9 unchanged lines hidden (view full) --- 282} 283 284static struct platform_driver clps711x_spi_driver = { 285 .driver = { 286 .name = DRIVER_NAME, 287 .owner = THIS_MODULE, 288 }, 289 .probe = spi_clps711x_probe, |
290 .remove = __devexit_p(spi_clps711x_remove), | 290 .remove = spi_clps711x_remove, |
291}; 292module_platform_driver(clps711x_spi_driver); 293 294MODULE_LICENSE("GPL"); 295MODULE_AUTHOR("Alexander Shiyan <shc_work@mail.ru>"); 296MODULE_DESCRIPTION("CLPS711X SPI bus driver"); | 291}; 292module_platform_driver(clps711x_spi_driver); 293 294MODULE_LICENSE("GPL"); 295MODULE_AUTHOR("Alexander Shiyan <shc_work@mail.ru>"); 296MODULE_DESCRIPTION("CLPS711X SPI bus driver"); |