- rc = nvram_create_os_partition();
- if (!rc) {
- return 0;
- }
-
- /* need to free up some space */
- rc = nvram_remove_os_partition();
- if (rc) {
- return rc;
- }
-
- /* create a partition in this new space */
- rc = nvram_create_os_partition();
- if (rc) {
- printk(KERN_ERR "nvram_create_os_partition: Could not find a "
- "NVRAM partition large enough\n");
- return rc;
+ rc = nvram_create_partition("ppc64,linux", NVRAM_SIG_OS,
+ NVRAM_MAX_REQ, NVRAM_MIN_REQ);
+ if (rc < 0) {
+ /* need to free up some space */
+ rc = nvram_remove_os_partition();
+ if (rc)
+ return rc;
+ /* create a partition in this new space */
+ rc = nvram_create_partition("ppc64,linux", NVRAM_SIG_OS,
+ NVRAM_MAX_REQ, NVRAM_MIN_REQ);
+ if (rc < 0) {
+ pr_err("nvram_create_partition: Could not find"
+ " enough space in NVRAM for partition\n");
+ return rc;
+ }