Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

OMAPDSS: SDI: remove code related to old panel model

Now that the old panel drivers have been removed, we can remove the
old-model API and related code from the DSS encoder drivers.

This patch removes the code from the SDI driver.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Archit Taneja <archit@ti.com>

+8 -103
+8 -97
drivers/video/omap2/dss/sdi.c
··· 124 124 dss_mgr_set_lcd_config(mgr, &sdi.mgr_config); 125 125 } 126 126 127 - int omapdss_sdi_display_enable(struct omap_dss_device *dssdev) 127 + static int sdi_display_enable(struct omap_dss_device *dssdev) 128 128 { 129 129 struct omap_dss_device *out = &sdi.output; 130 130 struct omap_video_timings *t = &sdi.timings; ··· 211 211 err_reg_enable: 212 212 return r; 213 213 } 214 - EXPORT_SYMBOL(omapdss_sdi_display_enable); 215 214 216 - void omapdss_sdi_display_disable(struct omap_dss_device *dssdev) 215 + static void sdi_display_disable(struct omap_dss_device *dssdev) 217 216 { 218 217 struct omap_overlay_manager *mgr = sdi.output.manager; 219 218 ··· 224 225 225 226 regulator_disable(sdi.vdds_sdi_reg); 226 227 } 227 - EXPORT_SYMBOL(omapdss_sdi_display_disable); 228 228 229 - void omapdss_sdi_set_timings(struct omap_dss_device *dssdev, 229 + static void sdi_set_timings(struct omap_dss_device *dssdev, 230 230 struct omap_video_timings *timings) 231 231 { 232 232 sdi.timings = *timings; 233 233 } 234 - EXPORT_SYMBOL(omapdss_sdi_set_timings); 235 234 236 235 static void sdi_get_timings(struct omap_dss_device *dssdev, 237 236 struct omap_video_timings *timings) ··· 251 254 return 0; 252 255 } 253 256 254 - void omapdss_sdi_set_datapairs(struct omap_dss_device *dssdev, int datapairs) 257 + static void sdi_set_datapairs(struct omap_dss_device *dssdev, int datapairs) 255 258 { 256 259 sdi.datapairs = datapairs; 257 260 } 258 - EXPORT_SYMBOL(omapdss_sdi_set_datapairs); 259 261 260 262 static int sdi_init_regulator(void) 261 263 { ··· 270 274 } 271 275 272 276 sdi.vdds_sdi_reg = vdds_sdi; 273 - 274 - return 0; 275 - } 276 - 277 - static struct omap_dss_device *sdi_find_dssdev(struct platform_device *pdev) 278 - { 279 - struct omap_dss_board_info *pdata = pdev->dev.platform_data; 280 - const char *def_disp_name = omapdss_get_default_display_name(); 281 - struct omap_dss_device *def_dssdev; 282 - int i; 283 - 284 - def_dssdev = NULL; 285 - 286 - for (i = 0; i < pdata->num_devices; ++i) { 287 - struct omap_dss_device *dssdev = pdata->devices[i]; 288 - 289 - if (dssdev->type != OMAP_DISPLAY_TYPE_SDI) 290 - continue; 291 - 292 - if (def_dssdev == NULL) 293 - def_dssdev = dssdev; 294 - 295 - if (def_disp_name != NULL && 296 - strcmp(dssdev->name, def_disp_name) == 0) { 297 - def_dssdev = dssdev; 298 - break; 299 - } 300 - } 301 - 302 - return def_dssdev; 303 - } 304 - 305 - static int sdi_probe_pdata(struct platform_device *sdidev) 306 - { 307 - struct omap_dss_device *plat_dssdev; 308 - struct omap_dss_device *dssdev; 309 - int r; 310 - 311 - plat_dssdev = sdi_find_dssdev(sdidev); 312 - 313 - if (!plat_dssdev) 314 - return 0; 315 - 316 - dssdev = dss_alloc_and_init_device(&sdidev->dev); 317 - if (!dssdev) 318 - return -ENOMEM; 319 - 320 - dss_copy_device_pdata(dssdev, plat_dssdev); 321 - 322 - r = sdi_init_regulator(); 323 - if (r) { 324 - DSSERR("device %s init failed: %d\n", dssdev->name, r); 325 - dss_put_device(dssdev); 326 - return r; 327 - } 328 - 329 - r = omapdss_output_set_device(&sdi.output, dssdev); 330 - if (r) { 331 - DSSERR("failed to connect output to new device: %s\n", 332 - dssdev->name); 333 - dss_put_device(dssdev); 334 - return r; 335 - } 336 - 337 - r = dss_add_device(dssdev); 338 - if (r) { 339 - DSSERR("device %s register failed: %d\n", dssdev->name, r); 340 - omapdss_output_unset_device(&sdi.output); 341 - dss_put_device(dssdev); 342 - return r; 343 - } 344 277 345 278 return 0; 346 279 } ··· 321 396 .connect = sdi_connect, 322 397 .disconnect = sdi_disconnect, 323 398 324 - .enable = omapdss_sdi_display_enable, 325 - .disable = omapdss_sdi_display_disable, 399 + .enable = sdi_display_enable, 400 + .disable = sdi_display_disable, 326 401 327 402 .check_timings = sdi_check_timings, 328 - .set_timings = omapdss_sdi_set_timings, 403 + .set_timings = sdi_set_timings, 329 404 .get_timings = sdi_get_timings, 330 405 331 - .set_datapairs = omapdss_sdi_set_datapairs, 406 + .set_datapairs = sdi_set_datapairs, 332 407 }; 333 408 334 409 static void sdi_init_output(struct platform_device *pdev) ··· 355 430 356 431 static int omap_sdi_probe(struct platform_device *pdev) 357 432 { 358 - int r; 359 - 360 433 sdi.pdev = pdev; 361 434 362 435 sdi_init_output(pdev); 363 436 364 - if (pdev->dev.platform_data) { 365 - r = sdi_probe_pdata(pdev); 366 - if (r) 367 - goto err_probe; 368 - } 369 - 370 437 return 0; 371 - 372 - err_probe: 373 - sdi_uninit_output(pdev); 374 - return r; 375 438 } 376 439 377 440 static int __exit omap_sdi_remove(struct platform_device *pdev) 378 441 { 379 - dss_unregister_child_devices(&pdev->dev); 380 - 381 442 sdi_uninit_output(pdev); 382 443 383 444 return 0;
-6
include/video/omapdss.h
··· 987 987 #define to_dss_driver(x) container_of((x), struct omap_dss_driver, driver) 988 988 #define to_dss_device(x) container_of((x), struct omap_dss_device, old_dev) 989 989 990 - int omapdss_sdi_display_enable(struct omap_dss_device *dssdev); 991 - void omapdss_sdi_display_disable(struct omap_dss_device *dssdev); 992 - void omapdss_sdi_set_timings(struct omap_dss_device *dssdev, 993 - struct omap_video_timings *timings); 994 - void omapdss_sdi_set_datapairs(struct omap_dss_device *dssdev, int datapairs); 995 - 996 990 int omapdss_rfbi_display_enable(struct omap_dss_device *dssdev); 997 991 void omapdss_rfbi_display_disable(struct omap_dss_device *dssdev); 998 992 int omap_rfbi_update(struct omap_dss_device *dssdev, void (*callback)(void *),