On 03/26/2014 12:41 PM, Jason Jin wrote:
+       if (!diu_ops.set_pixel_clock) {
+               data->saved_pixel_clock = 0;
+               if (of_address_to_resource(ofdev->dev.of_node, 1, &res))
+                       pr_err(KERN_ERR "No pixel clock set func and no pixel 
node!\n");
+               else {
+                       data->pixelclk_ptr =
+                               devm_ioremap(&ofdev->dev, res.start, 
resource_size(&res));
+                       if (!data->pixelclk_ptr) {
+                               pr_err(KERN_ERR "fslfb: could not map pixelclk 
register!\n");
+                               ret = -ENOMEM;
+                       } else
+                               data->saved_pixel_clock = 
in_be32(data->pixelclk_ptr);
+               }
+       }

This seems very hackish. What node does ofdev point to? I wonder if this code should be in the platform file instead.

Also, use dev_info() instead of pr_err, and never use exclamation marks in driver messages.


_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Reply via email to