Пример #1
0
static int xylonfb_platform_init(void)
{
	int err;

#ifndef MODULE
	char *option = NULL;
	/*
	 *  For kernel boot options (in 'video=xxxfb:<options>' format)
	 */
	if (fb_get_options(DRIVER_NAME, &option))
		return -ENODEV;
	/* Set internal module parameters */
	xylonfb_get_params(option);
#endif
	err = platform_device_register(&logicvc_0_device);
	if (err) {
		pr_err("Error xylonfb device registration\n");
		return err;
	}
	err = platform_driver_register(&xylonfb_driver);
	if (err) {
		pr_err("Error xylonfb driver registration\n");
		platform_device_unregister(&logicvc_0_device);
		return err;
	}

	return 0;
}
Пример #2
0
static int xylonfb_init(void)
{
	char *option = NULL;
	/*
	 *  Kernel boot options (in 'video=xxxfb:<options>' format)
	 */
	if (fb_get_options(XYLONFB_DRIVER_NAME, &option))
		return -ENODEV;
	/* Set internal module parameters */
	xylonfb_get_params(option);

	if (platform_driver_register(&xylonfb_driver)) {
		pr_err("failed %s driver registration\n", XYLONFB_DRIVER_NAME);
		return -ENODEV;
	}

	return 0;
}
Пример #3
0
static int xylonfb_of_init(void)
{
#ifndef MODULE
	char *option = NULL;
	/*
	 *  For kernel boot options (in 'video=xxxfb:<options>' format)
	 */
	if (fb_get_options(DRIVER_NAME, &option))
		return -ENODEV;
	/* Set internal module parameters */
	xylonfb_get_params(option);
#endif
	if (platform_driver_register(&xylonfb_of_driver)) {
		pr_err("Error xylonfb driver registration\n");
		return -ENODEV;
	}

	return 0;
}