In this paper, we study the uplink spectrum sharing in a device-to-device (D2D) underlaid LTE-Advanced network. The fractional power control (FPC) policy is proposed for both cellular user equipments (CUEs) and D2D users to reduce the cross-tier interference. We present an analytical framework to evaluate the effect of FPC on the network performance in terms of coverage probability and D2D user transmission capacity. By exploiting the CUE's location information, we further propose a location-aware spectrum sharing (LoSS) policy which can increase the D2D user's transmission opportunities while satisfying the CUE's QoS constraint. The proposed framework allows to determine the optimal FPC parameter for a CUE at any given location in the macrocell, and provides a more accurate analysis on the spectrum sharing between CUEs and D2D users. From the perspective of D2D transmission capacity, we provide guidelines for the optimal design of FPC in the D2D underlaid LTE-Advanced network.