spi-pxa2xx.c (ffee921033e64edf8579a3b21c7f15d1a6c3ef71) | spi-pxa2xx.c (a807fcd090d6e778717d0954fc6a58a72ee16ba0) |
---|---|
1/* 2 * Copyright (C) 2005 Stephen Street / StreetFire Sound Labs 3 * Copyright (C) 2013, Intel Corporation 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation; either version 2 of the License, or 8 * (at your option) any later version. --- 1182 unchanged lines hidden (view full) --- 1191 1192 lpss_ssp_setup(drv_data); 1193 1194 tasklet_init(&drv_data->pump_transfers, pump_transfers, 1195 (unsigned long)drv_data); 1196 1197 /* Register with the SPI framework */ 1198 platform_set_drvdata(pdev, drv_data); | 1/* 2 * Copyright (C) 2005 Stephen Street / StreetFire Sound Labs 3 * Copyright (C) 2013, Intel Corporation 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation; either version 2 of the License, or 8 * (at your option) any later version. --- 1182 unchanged lines hidden (view full) --- 1191 1192 lpss_ssp_setup(drv_data); 1193 1194 tasklet_init(&drv_data->pump_transfers, pump_transfers, 1195 (unsigned long)drv_data); 1196 1197 /* Register with the SPI framework */ 1198 platform_set_drvdata(pdev, drv_data); |
1199 status = spi_register_master(master); | 1199 status = devm_spi_register_master(&pdev->dev, master); |
1200 if (status != 0) { 1201 dev_err(&pdev->dev, "problem registering spi master\n"); 1202 goto out_error_clock_enabled; 1203 } 1204 1205 pm_runtime_set_autosuspend_delay(&pdev->dev, 50); 1206 pm_runtime_use_autosuspend(&pdev->dev); 1207 pm_runtime_set_active(&pdev->dev); --- 35 unchanged lines hidden (view full) --- 1243 pm_runtime_disable(&pdev->dev); 1244 1245 /* Release IRQ */ 1246 free_irq(ssp->irq, drv_data); 1247 1248 /* Release SSP */ 1249 pxa_ssp_free(ssp); 1250 | 1200 if (status != 0) { 1201 dev_err(&pdev->dev, "problem registering spi master\n"); 1202 goto out_error_clock_enabled; 1203 } 1204 1205 pm_runtime_set_autosuspend_delay(&pdev->dev, 50); 1206 pm_runtime_use_autosuspend(&pdev->dev); 1207 pm_runtime_set_active(&pdev->dev); --- 35 unchanged lines hidden (view full) --- 1243 pm_runtime_disable(&pdev->dev); 1244 1245 /* Release IRQ */ 1246 free_irq(ssp->irq, drv_data); 1247 1248 /* Release SSP */ 1249 pxa_ssp_free(ssp); 1250 |
1251 /* Disconnect from the SPI framework */ 1252 spi_unregister_master(drv_data->master); 1253 | |
1254 return 0; 1255} 1256 1257static void pxa2xx_spi_shutdown(struct platform_device *pdev) 1258{ 1259 int status = 0; 1260 1261 if ((status = pxa2xx_spi_remove(pdev)) != 0) --- 88 unchanged lines hidden --- | 1251 return 0; 1252} 1253 1254static void pxa2xx_spi_shutdown(struct platform_device *pdev) 1255{ 1256 int status = 0; 1257 1258 if ((status = pxa2xx_spi_remove(pdev)) != 0) --- 88 unchanged lines hidden --- |