hd44780.c (9a87ffc99ec8eb8d35eed7c4f816d75f5cc9662e) | hd44780.c (9ea02f7cc39d484d16e8a14f3713fefcd33407c0) |
---|---|
1// SPDX-License-Identifier: GPL-2.0+ 2/* 3 * HD44780 Character LCD driver for Linux 4 * 5 * Copyright (C) 2000-2008, Willy Tarreau <w@1wt.eu> 6 * Copyright (C) 2016-2017 Glider bvba 7 */ 8 --- 305 unchanged lines hidden (view full) --- 314 kfree(hd); 315fail2: 316 kfree(lcd); 317fail1: 318 kfree(hdc); 319 return ret; 320} 321 | 1// SPDX-License-Identifier: GPL-2.0+ 2/* 3 * HD44780 Character LCD driver for Linux 4 * 5 * Copyright (C) 2000-2008, Willy Tarreau <w@1wt.eu> 6 * Copyright (C) 2016-2017 Glider bvba 7 */ 8 --- 305 unchanged lines hidden (view full) --- 314 kfree(hd); 315fail2: 316 kfree(lcd); 317fail1: 318 kfree(hdc); 319 return ret; 320} 321 |
322static int hd44780_remove(struct platform_device *pdev) | 322static void hd44780_remove(struct platform_device *pdev) |
323{ 324 struct charlcd *lcd = platform_get_drvdata(pdev); 325 struct hd44780_common *hdc = lcd->drvdata; 326 327 charlcd_unregister(lcd); 328 kfree(hdc->hd44780); 329 kfree(lcd->drvdata); 330 331 kfree(lcd); | 323{ 324 struct charlcd *lcd = platform_get_drvdata(pdev); 325 struct hd44780_common *hdc = lcd->drvdata; 326 327 charlcd_unregister(lcd); 328 kfree(hdc->hd44780); 329 kfree(lcd->drvdata); 330 331 kfree(lcd); |
332 return 0; | |
333} 334 335static const struct of_device_id hd44780_of_match[] = { 336 { .compatible = "hit,hd44780" }, 337 { /* sentinel */ } 338}; 339MODULE_DEVICE_TABLE(of, hd44780_of_match); 340 341static struct platform_driver hd44780_driver = { 342 .probe = hd44780_probe, | 332} 333 334static const struct of_device_id hd44780_of_match[] = { 335 { .compatible = "hit,hd44780" }, 336 { /* sentinel */ } 337}; 338MODULE_DEVICE_TABLE(of, hd44780_of_match); 339 340static struct platform_driver hd44780_driver = { 341 .probe = hd44780_probe, |
343 .remove = hd44780_remove, | 342 .remove_new = hd44780_remove, |
344 .driver = { 345 .name = "hd44780", 346 .of_match_table = hd44780_of_match, 347 }, 348}; 349 350module_platform_driver(hd44780_driver); 351MODULE_DESCRIPTION("HD44780 Character LCD driver"); 352MODULE_AUTHOR("Geert Uytterhoeven <geert@linux-m68k.org>"); 353MODULE_LICENSE("GPL"); | 343 .driver = { 344 .name = "hd44780", 345 .of_match_table = hd44780_of_match, 346 }, 347}; 348 349module_platform_driver(hd44780_driver); 350MODULE_DESCRIPTION("HD44780 Character LCD driver"); 351MODULE_AUTHOR("Geert Uytterhoeven <geert@linux-m68k.org>"); 352MODULE_LICENSE("GPL"); |