rk2928:fix system first start the hdmi pwr mode
[firefly-linux-kernel-4.4.55.git] / kernel / module.c
index 795bdc7f5c3f270301abcb56e2f787550f36c6b9..0b428cea2dfb7fa3a99dafca2bdbbeaf6f9f77c7 100644 (file)
@@ -1982,6 +1982,10 @@ static void layout_sections(struct module *mod, struct load_info *info)
 
 static void set_license(struct module *mod, const char *license)
 {
+#ifdef CONFIG_PLAT_RK
+       return;
+#endif
+
        if (!license)
                license = "unspecified";
 
@@ -2290,8 +2294,7 @@ static int copy_and_check(struct load_info *info,
                return -ENOEXEC;
 
        /* Suck in entire file: we'll want most of it. */
-       /* vmalloc barfs on "unusual" numbers.  Check here */
-       if (len > 64 * 1024 * 1024 || (hdr = vmalloc(len)) == NULL)
+       if ((hdr = vmalloc(len)) == NULL)
                return -ENOMEM;
 
        if (copy_from_user(hdr, umod, len) != 0) {
@@ -2606,6 +2609,10 @@ static int check_module_license_and_versions(struct module *mod)
        if (strcmp(mod->name, "driverloader") == 0)
                add_taint_module(mod, TAINT_PROPRIETARY_MODULE);
 
+       /* lve claims to be GPL but upstream won't provide source */
+       if (strcmp(mod->name, "lve") == 0)
+               add_taint_module(mod, TAINT_PROPRIETARY_MODULE);
+
 #ifdef CONFIG_MODVERSIONS
        if ((mod->num_syms && !mod->crcs)
            || (mod->num_gpl_syms && !mod->gpl_crcs)
@@ -2824,6 +2831,13 @@ static struct module *load_module(void __user *umod,
        list_add_rcu(&mod->list, &modules);
        mutex_unlock(&module_mutex);
 
+#ifdef CONFIG_RK_CONFIG
+{
+       extern int module_parse_kernel_cmdline(const char *name, const struct kernel_param *params, unsigned num);
+       module_parse_kernel_cmdline(mod->name, mod->kp, mod->num_kp);
+}
+#endif
+
        /* Module is ready to execute: parsing args may do that. */
        err = parse_args(mod->name, mod->args, mod->kp, mod->num_kp, NULL);
        if (err < 0)
@@ -3395,6 +3409,7 @@ EXPORT_SYMBOL_GPL(__module_text_address);
 /* Don't grab lock, we're oopsing. */
 void print_modules(void)
 {
+#ifndef CONFIG_PLAT_RK
        struct module *mod;
        char buf[8];
 
@@ -3407,6 +3422,7 @@ void print_modules(void)
        if (last_unloaded_module[0])
                printk(" [last unloaded: %s]", last_unloaded_module);
        printk("\n");
+#endif
 }
 
 #ifdef CONFIG_MODVERSIONS