Re: linux-next: firmware tree build failure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2009-04-14 at 14:12 +1000, Stephen Rothwell wrote:
> Today's linux-next build (sparc64 defconfig) failed like this:
> 
> drivers/base/firmware_class.c: In function 'firmware_loading_store':
> drivers/base/firmware_class.c:173: error: 'PAGE_KERNEL_RO' undeclared
> (first use in this function)

I've updated the firmware tree with the following. Thanks.

diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c
index 90cb7c2..f19afa8 100644
--- a/drivers/base/firmware_class.c
+++ b/drivers/base/firmware_class.c
@@ -125,6 +125,10 @@ static ssize_t firmware_loading_show(struct device *dev,
 	return sprintf(buf, "%d\n", loading);
 }
 
+/* Some architectures don't have PAGE_KERNEL_RO */
+#ifndef PAGE_KERNEL_RO
+#define PAGE_KERNEL_RO PAGE_KERNEL
+#endif
 /**
  * firmware_loading_store - set value in the 'loading' control file
  * @dev: device pointer
@@ -224,7 +228,7 @@ firmware_data_read(struct kobject *kobj, struct bin_attribute *bin_attr,
 		void *page_data;
 		int page_nr = offset >> PAGE_SHIFT;
 		int page_ofs = offset & (PAGE_SIZE-1);
-		int page_cnt = min(PAGE_SIZE - page_ofs, count);
+		int page_cnt = min_t(size_t, PAGE_SIZE - page_ofs, count);
 
 		page_data = kmap(fw_priv->pages[page_nr]);
 
@@ -318,7 +322,7 @@ firmware_data_write(struct kobject *kobj, struct bin_attribute *bin_attr,
 		void *page_data;
 		int page_nr = offset >> PAGE_SHIFT;
 		int page_ofs = offset & (PAGE_SIZE - 1);
-		int page_cnt = min(PAGE_SIZE - page_ofs, count);
+		int page_cnt = min_t(size_t, PAGE_SIZE - page_ofs, count);
 
 		page_data = kmap(fw_priv->pages[page_nr]);
 

-- 
David Woodhouse                            Open Source Technology Centre
David.Woodhouse@xxxxxxxxx                              Intel Corporation

--
To unsubscribe from this list: send the line "unsubscribe linux-next" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Linux USB Development]     [Yosemite News]     [Linux SCSI]

  Powered by Linux