Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 354763
b: refs/heads/master
c: e163d1f
h: refs/heads/master
i:
  354761: 2dab08a
  354759: a885654
v: v3
  • Loading branch information
Vineet Gupta authored and Greg Kroah-Hartman committed Jan 16, 2013
1 parent 0866d3d commit 6b7e5e3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 026bb292c4018dd77186dee1fcb73c9067e69b89
refs/heads/master: e163d1f42bc2089efae58b4966287c4d3504d4c7
21 changes: 11 additions & 10 deletions trunk/drivers/tty/serial/arc_uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@ static struct __initdata console arc_early_serial_console = {
.index = -1
};

static int arc_serial_probe_earlyprintk(struct platform_device *pdev)
static int __init arc_serial_probe_earlyprintk(struct platform_device *pdev)
{
int dev_id = pdev->id < 0 ? 0 : pdev->id;
int rc;
Expand All @@ -667,20 +667,12 @@ static int arc_serial_probe_earlyprintk(struct platform_device *pdev)
register_console(&arc_early_serial_console);
return 0;
}
#else
static int arc_serial_probe_earlyprintk(struct platform_device *pdev)
{
return -ENODEV;
}
#endif /* CONFIG_SERIAL_ARC_CONSOLE */

static int arc_serial_probe(struct platform_device *pdev)
{
int rc, dev_id;

if (is_early_platform_device(pdev))
return arc_serial_probe_earlyprintk(pdev);

dev_id = pdev->id < 0 ? 0 : pdev->id;
rc = arc_uart_init_one(pdev, dev_id);
if (rc)
Expand All @@ -706,14 +698,23 @@ static struct platform_driver arc_platform_driver = {
};

#ifdef CONFIG_SERIAL_ARC_CONSOLE

static struct platform_driver early_arc_platform_driver = {
.probe = arc_serial_probe_earlyprintk,
.remove = arc_serial_remove,
.driver = {
.name = DRIVER_NAME,
.owner = THIS_MODULE,
},
};
/*
* Register an early platform driver of "earlyprintk" class.
* ARCH platform code installs the driver and probes the early devices
* The installation could rely on user specifying earlyprintk=xyx in cmd line
* or it could be done independently, for all "earlyprintk" class drivers.
* [see arch/arc/plat-arcfpga/platform.c]
*/
early_platform_init("earlyprintk", &arc_platform_driver);
early_platform_init("earlyprintk", &early_arc_platform_driver);

#endif /* CONFIG_SERIAL_ARC_CONSOLE */

Expand Down

0 comments on commit 6b7e5e3

Please sign in to comment.