From LDD3/ Ch. 15/ sections \"Using remap_pfn_range\" and \"A Simple Implementation\", pfn has been equated to the vm_pgoff field. I am confused by this. How can that be so?
The specific example you've provided is implementing a character device file that allows one to map physical memory, very similar to /dev/mem. By specifying the offset of the file you specify the physical memory address. Hence the calculation that takes the offset and divide in the page size to find the PFN.
For a "real" device driver, you would normally have the physical address of the device memory mapped registers or RAM hard coded from the device specification, and use that to derive the PFN (by dividing by the page size).