Patchwork [RESEND,1/2] efi_runtime: add checking the efi enviroment

login
register
mail settings
Submitter Ivan Hu
Date Sept. 28, 2012, 9:46 a.m.
Message ID <1348825579-6066-1-git-send-email-ivan.hu@canonical.com>
Download mbox | patch
Permalink /patch/187749/
State Rejected
Headers show

Comments

Ivan Hu - Sept. 28, 2012, 9:46 a.m.
This driver should be worked on efi enviroment, so efi_runtime_init will
check efi_enable to register the driver.

Signed-off-by: Ivan Hu <ivan.hu@canonical.com>
---
 efi_runtime/efi_runtime.c |    3 +++
 1 file changed, 3 insertions(+)
Keng-Yu Lin - Oct. 2, 2012, 3:32 a.m.
On Fri, Sep 28, 2012 at 5:46 PM, Ivan Hu <ivan.hu@canonical.com> wrote:
> This driver should be worked on efi enviroment, so efi_runtime_init will
> check efi_enable to register the driver.
>
> Signed-off-by: Ivan Hu <ivan.hu@canonical.com>
> ---
>  efi_runtime/efi_runtime.c |    3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/efi_runtime/efi_runtime.c b/efi_runtime/efi_runtime.c
> index 7d99fbc..ccf4eff 100644
> --- a/efi_runtime/efi_runtime.c
> +++ b/efi_runtime/efi_runtime.c
> @@ -304,6 +304,9 @@ static int __init efi_runtime_init(void)
>
>         printk(KERN_INFO "EFI_RUNTIME Driver v%s\n", EFI_FWTS_EFI_VERSION);
>
> +       if (!efi_enabled)
> +               return -ENODEV;
> +
>         ret = misc_register(&efi_runtime_dev);
>         if (ret) {
>                 printk(KERN_ERR "efi_runtime: can't misc_register on minor=%d\n",
> --
> 1.7.9.5
>
Acked-by: Keng-Yu Lin <kengyu@canonical.com>
Colin King - Oct. 2, 2012, 9:09 a.m.
On 28/09/12 10:46, Ivan Hu wrote:
> This driver should be worked on efi enviroment, so efi_runtime_init will
> check efi_enable to register the driver.
>
> Signed-off-by: Ivan Hu <ivan.hu@canonical.com>
> ---
>   efi_runtime/efi_runtime.c |    3 +++
>   1 file changed, 3 insertions(+)
>
> diff --git a/efi_runtime/efi_runtime.c b/efi_runtime/efi_runtime.c
> index 7d99fbc..ccf4eff 100644
> --- a/efi_runtime/efi_runtime.c
> +++ b/efi_runtime/efi_runtime.c
> @@ -304,6 +304,9 @@ static int __init efi_runtime_init(void)
>
>   	printk(KERN_INFO "EFI_RUNTIME Driver v%s\n", EFI_FWTS_EFI_VERSION);
>
> +	if (!efi_enabled)
> +		return -ENODEV;
> +
>   	ret = misc_register(&efi_runtime_dev);
>   	if (ret) {
>   		printk(KERN_ERR "efi_runtime: can't misc_register on minor=%d\n",
>

Typo on enviroment --> should be environment.

Colin

Patch

diff --git a/efi_runtime/efi_runtime.c b/efi_runtime/efi_runtime.c
index 7d99fbc..ccf4eff 100644
--- a/efi_runtime/efi_runtime.c
+++ b/efi_runtime/efi_runtime.c
@@ -304,6 +304,9 @@  static int __init efi_runtime_init(void)
 
 	printk(KERN_INFO "EFI_RUNTIME Driver v%s\n", EFI_FWTS_EFI_VERSION);
 
+	if (!efi_enabled)
+		return -ENODEV;
+
 	ret = misc_register(&efi_runtime_dev);
 	if (ret) {
 		printk(KERN_ERR "efi_runtime: can't misc_register on minor=%d\n",