Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

+of_platform_populate and other smallfixes

  • Loading branch information...
commit 317133da9baa3751fbf9f9248a72e8fca4166b7e 1 parent d22dcf1
@makelinux authored
Showing with 7 additions and 3 deletions.
  1. +1 −1  ctracer.h
  2. +6 −2 ldt.c
View
2  ctracer.h
@@ -371,7 +371,7 @@ int lookup_symbol_name(unsigned long addr, char *symname);
#define _trace_enter_exit_() char _caller[200]; lookup_symbol_name((unsigned long)__builtin_return_address(0), _caller); \
char __attribute__((cleanup(__on_cleanup))) *_s; char _ret_msg[100]; _s = _ret_msg; \
snprintf(_ret_msg, sizeof(_ret_msg), "%s < %s }\n", _caller, __func__); \
- tracef("%s > %s { @ %s:%d", _caller, __func__, __file__, __LINE__);
+ tracef(SOL"%s > %s { @ %s:%d", _caller, __func__, __file__, __LINE__);
/*__END_DECLS */
#endif /* CTRACER_H_INCLUDED */
View
8 ldt.c
@@ -56,6 +56,7 @@
#include <linux/debugfs.h>
#include <linux/cdev.h>
#include <linux/of.h>
+#include <linux/of_platform.h>
#include <linux/mod_devicetable.h>
#include "tracing.h"
@@ -488,7 +489,7 @@ static int uart_probe(void)
{
int ret = 0;
if (port) {
- port_ptr = ioport_map(port, 0x100);
+ port_ptr = ioport_map(port, port_size);
trace_hex(port_ptr);
port_r = request_region(port, port_size, ldt_name);
trace_hex(port_r);
@@ -590,7 +591,11 @@ static __devinit int ldt_probe(struct platform_device *pdev)
dev_dbg(&pdev->dev, "%s:%d %s attaching driver\n", __file__, __LINE__, __func__);
trace_hex(pdev->dev.of_node);
trace_ln();
+#ifdef CONFIG_OF_DEVICE
+ check(of_platform_populate(pdev->dev.of_node, NULL, NULL, &pdev->dev));
+#endif
data = pdev->dev.platform_data;
+ printk("%p %s\n", data, data);
if (!irq)
irq = platform_get_irq(pdev, 0);
r = platform_get_resource(pdev, IORESOURCE_IO, 0);
@@ -600,7 +605,6 @@ static __devinit int ldt_probe(struct platform_device *pdev)
if (r && !port_size)
port_size = resource_size(r);
}
- printk("%p %s\n", data, data);
isr_counter = 0;
uart_probe();
/* proc_create(ldt_name, 0, NULL, &ldt_fops); depricated */
Please sign in to comment.
Something went wrong with that request. Please try again.